Commit Graph

74 Commits

Author SHA1 Message Date
Janus 1763d02b05 rename lnhtlc->lnchan, HTLCStateMachine->Channel 2019-08-20 09:03:10 +02:00
Janus b26dc66567 lnhtlc: only store feerate once, don't store heights since we do not roll back 2019-08-20 09:03:10 +02:00
Janus e8471e483b lnhtlc: merge config and state, remove unnecessary properties 2019-08-20 09:03:10 +02:00
Janus 1d4c113a35 lnhtlc: remove lookup_htlc, use heterogeneously typed lists 2019-08-20 09:03:10 +02:00
ThomasV d439b3c308 fix previous commit 2019-08-20 09:03:10 +02:00
ThomasV 1ebd1baebf follow-up 1c8a4bcfa497b117e4511c2f108dbca8a1adb793 2019-08-20 09:03:10 +02:00
SomberNight 8d4a5bd1d7 lnbase: handle some error codes re htlc failures ('UPDATE' flag) 2019-08-20 09:03:10 +02:00
SomberNight a8ace7ef4f lnonion: use IntEnum and IntFlag for failure codes 2019-08-20 09:03:10 +02:00
SomberNight 864efa029b handle failing htlc after restart 2019-08-20 09:03:10 +02:00
SomberNight eced61123d clean up local/global features 2019-08-20 09:03:10 +02:00
SomberNight 4d32478f30 on_channel_reestablish: try to get remote to force close channel if out-of-sync.
see ACINQ/eclair#727 and lightningnetwork/lnd#1904
2019-08-20 09:03:10 +02:00
SomberNight 1946254ef2 on_update_fail_htlc: don't send commitment without changes
c-lightning was force-closing channels with us: "[lnbase:127.0.0.1] error commit_sig with no changes"
2019-08-20 09:03:10 +02:00
SomberNight bf25d765d9 simplify ChannelDB.on_channel_update 2019-08-20 09:03:10 +02:00
SomberNight 97393d05aa use 'r' field in invoice when making payments (routing hints) 2019-08-20 09:03:10 +02:00
SomberNight 029ec5a5ab make our channels private, and put routing hints in invoices we create 2019-08-20 09:03:10 +02:00
ThomasV c1b34dafe2 follow-up previous commit 2019-08-20 09:03:10 +02:00
SomberNight 5fbadafdb1 follow-up lnwatcher changes 2019-08-20 09:03:10 +02:00
ThomasV 6b9de278d4 aiosafe: define user visible exception class 2019-08-20 09:03:10 +02:00
ThomasV 6f3c2b30ed lnbase: propagate error messages received in on_error to their relevant coroutines 2019-08-20 09:03:10 +02:00
ThomasV 11c3ca281c create sweep transaction outside of lnwatcher 2019-08-20 09:03:10 +02:00
SomberNight 707c7d569d lnbase: Peer handles its own disconnection instead of lnworker 2019-08-20 09:03:10 +02:00
SomberNight 17457327ef make key derivation reasonable
no more hardcoded secrets, no more key-reuse
2019-08-20 09:03:10 +02:00
Janus 8bd6dc2425 ln: fix opening of channels (NameErrors) 2019-08-20 09:03:10 +02:00
Janus bdf36ac649 lnbase: update gui after accomodating channel opening request 2019-08-20 09:03:10 +02:00
Janus 0405f0d9ad accept channel opening requests initiated by remote 2019-08-20 09:03:10 +02:00
Janus 646881f437 lnworker.pay(): lightning-integration support 2019-08-20 09:03:10 +02:00
Janus cef3a30c5a lnbase: remove code duplication by introducing send_commitment(chan) 2019-08-20 09:03:10 +02:00
Janus addd8928bf lnbase: remove unnecessary branching and duplicated code in receive_commitment_revoke_ack 2019-08-20 09:03:10 +02:00
ThomasV 75dd56eff0 avoid code duplication between methods that send channel updates 2019-08-20 09:03:10 +02:00
Janus 5e7117dddd ln: commit fee updates as soon as possible 2019-08-20 09:03:10 +02:00
Janus 5753cf9e05 ln fees: avoid resending same fee update before it has been committed to, docs 2019-08-20 09:03:10 +02:00
Janus 50b3bc939c avoid reading from queues concurrently in pay() 2019-08-20 09:03:10 +02:00
ThomasV a54631b873 add pong handler to reduce verbosity 2019-08-20 09:03:10 +02:00
Janus a04e37d050 keep htlc history in case a htlc fails 2019-08-20 09:03:10 +02:00
Janus cf4f0c5d3a add command to clear ln blacklist, prevent error in pay() from killing Peer 2019-08-20 09:03:10 +02:00
SomberNight fc0009206b fix prev 2019-08-20 09:03:10 +02:00
ThomasV 31b1243f25 lnbase: save_channel in revoke 2019-08-20 09:03:10 +02:00
ThomasV 8df569962d fix: broadcast_transaction from non network thread 2019-08-20 09:03:10 +02:00
ThomasV 180eb6d101 partial revert of df24fb00578309b5db27876769306196238ec3f2: process_message should not be async 2019-08-20 09:03:10 +02:00
Janus 224226f427 ln: cooperative close with remote peer initiating 2019-08-20 09:03:10 +02:00
Janus ff902a55ee lnhtlc: don't settle htlc with HTLCStateMachine too early 2019-08-20 09:03:10 +02:00
Janus d5d9270d0c lnhtlc: save logs and feeupdates 2019-08-20 09:03:10 +02:00
Janus 261fefb6f3 lnwatcher rebased 2019-08-20 09:03:10 +02:00
Janus 3eabd70df5 lightning: post aiorpcx rebase fixup 2019-08-20 09:03:10 +02:00
SomberNight 7edba63341 remove our closed channels from channeldb. note some FIXMEs
payment were attempting to use the closed channels.
2019-08-20 09:03:10 +02:00
SomberNight 08d20ce187 lnbase: fix payments 2019-08-20 09:03:10 +02:00
SomberNight 1b030fca78 rebase follow-up: use namedtuples from master in new code (TxOutput, TxMinedStatus) 2019-08-20 09:03:10 +02:00
SomberNight bab9f163f7 decode onion errors to failure message type 2019-08-20 09:03:10 +02:00
SomberNight 4d1785799b lnbase.pay: test if htlc can be added 2019-08-20 09:03:10 +02:00
SomberNight 15a6a83107 ln onchain fees: use 2 block ETAs with 150 s/b fallback 2019-08-20 09:03:10 +02:00