ThomasV
82e8bcebb6
restructure channel_reestablish, resend funding_locked if needed
2019-08-20 09:03:11 +02:00
ThomasV
8e753f998a
fix tests
2019-08-20 09:03:11 +02:00
ThomasV
a3c6f82bb2
move LNPeer handshake back into initialize
2019-08-20 09:03:11 +02:00
ThomasV
b5482e4470
create transport and perform handshake before creating Peer
2019-08-20 09:03:11 +02:00
ThomasV
61638664f7
do not add ephemeral addresses to recent peers
2019-08-20 09:03:11 +02:00
ThomasV
472e82e387
fix channel closure when it was requested by the remote party
2019-08-20 09:03:11 +02:00
Janus
18bd934461
ln: show full chan id in list, use Event for initialized, more timeouts, return peer from add_peer, set max_htlc_value_in_flight_msat to capacity
2019-08-20 09:03:11 +02:00
ThomasV
2af178a586
Store boolean is_received in lightning invoices. Sort lightning history with timestamp. Minor fixes
2019-08-20 09:03:11 +02:00
ThomasV
0e8dba897e
lightning:
...
* store invoices for both directions
* do not store lightning_payments_inflight, lightning_payments_completed in lnworker
* payment history is returned by get_payments method of LNChannel
* command line: lightning history, lightning_invoices
* re-enable push_msat
2019-08-20 09:03:11 +02:00
Janus
d80b709aa4
lnbase: fix on_open_channel, add TODOs for missing validation
2019-08-20 09:03:11 +02:00
Janus
d5ed4309bb
revert low max_htlc_value_in_flight_msat, fix test
...
spec does not mention that there can be an upper bound
on max_htlc_value_in_flight_msat, so don't try to make
any node happy that has a max limit on this.
2019-08-20 09:03:11 +02:00
Janus
e6bd3959e0
ln: handle channel limits better, show remote limits in details dialog, replace rusty's testnet peer (doesn't work currently)
2019-08-20 09:03:11 +02:00
Janus
7cf4f40dcb
ln: warn when negotiated feerate is too low
2019-08-20 09:03:11 +02:00
Janus
8fc1779b0d
ln: add test_lnwatcher
2019-08-20 09:03:11 +02:00
Janus
f8dc9b344a
lnbase: work around peer not sending funding_locked so channel doesn't get marked open
2019-08-20 09:03:11 +02:00
Janus
6b6097a453
ln: add closechannel cli command
2019-08-20 09:03:11 +02:00
Janus
e56e849505
lnchan refactor
...
- replace undoing logic with new HTLCManager class
- separate SENT/RECEIVED
- move UpdateAddHtlc to lnutil
2019-08-20 09:03:11 +02:00
ThomasV
d9e7807fff
lnpeer: print port in error_messages
2019-08-20 09:03:11 +02:00
Janus
60508725b6
lnbase: fix sig encoding in mutual close
2019-08-20 09:03:11 +02:00
Janus
37a0315aab
lnbase: fix NameError
2019-08-20 09:03:11 +02:00
ThomasV
fde9f91902
lnchannel: store pre-signed sweep transactions after each new commitment
2019-08-20 09:03:11 +02:00
Janus
133e5ec8c3
use gossip_timestamp_filter instead of request_initial_sync
2019-08-20 09:03:11 +02:00
ThomasV
c0a1af2032
fix channel closure:
...
- add 'CLOSING' state
- wait until channel has no inflight HTLC
- end fee negocitation when both parties agree on the fee
(previously code ended it only when the other party had broadcast)
- broadcast the closing transaction
2019-08-20 09:03:11 +02:00
SomberNight
595cfcbb65
move sweeping methods from lnchan.py to new file
...
also sweep "received" htlcs from "our" ctx
also sweep htlcs from their ctx (non-breach)
extract ctn; included_htlcs_in_their_latest_ctxs
2019-08-20 09:03:11 +02:00
SomberNight
bc72966442
lnchan: follow-up "replace properties with functions"
2019-08-20 09:03:11 +02:00
ThomasV
78896897cb
lnchan: replace properties with functions
2019-08-20 09:03:11 +02:00
Janus
e3409d32ef
channel details with list of htlcs
2019-08-20 09:03:11 +02:00
ThomasV
5422de90a2
lightning: do not handle more than one fee update at a time
2019-08-20 09:03:11 +02:00
SomberNight
521fadb8cb
lnutil: restructure channel config namedtuples (local/remote config)
2019-08-20 09:03:11 +02:00
Janus
1425628604
add command for listing invoices and their progress, fix list_channels
2019-08-20 09:03:11 +02:00
SomberNight
5b7c801ca4
after rebase fixes
2019-08-20 09:03:11 +02:00
Janus
8a98810df1
do not co-op close channels with pending htlcs
2019-08-20 09:03:11 +02:00
Janus
c570bc5fb1
avoid leaving FORCE_CLOSING state, rebroadcast closing tx if reorged out
2019-08-20 09:03:11 +02:00
Janus
0ea87278fb
move force_close_channel to lnbase, test it, add FORCE_CLOSING state
2019-08-20 09:03:11 +02:00
SomberNight
c0ae7b5534
after rebase clean-up
2019-08-20 09:03:10 +02:00
Janus
7e76e82152
test_lnbase: add test that pays to another local electrum
2019-08-20 09:03:10 +02:00
SomberNight
ce2b572fa5
lnbase: more type annotations, and minor fix
2019-08-20 09:03:10 +02:00
SomberNight
449ec013fe
add licence headers to more files
2019-08-20 09:03:10 +02:00
Janus
85789d8a09
lnbase: mark initialized later, add tests, etc
...
- consistent node_id sorting
- require OPTION_DATA_LOSS_PROTECT and test it
2019-08-20 09:03:10 +02:00
Janus
578faeb91a
lnbase: do not assert only one htlc in commitment
2019-08-20 09:03:10 +02:00
Janus
a5a7c1406e
lightning channels reserves: use pretty balance in Qt, fix bugs, add tests
2019-08-20 09:03:10 +02:00
ThomasV
eb4e6b2e54
use WaitingDialog to close channels
2019-08-20 09:03:10 +02:00
ThomasV
70dbd8e672
add close_channel method to peer
2019-08-20 09:03:10 +02:00
ThomasV
f985aac8d1
fix typo
2019-08-20 09:03:10 +02:00
ThomasV
5ca6fbaea7
lnbase: self.channel_reestablished is not a queue
2019-08-20 09:03:10 +02:00
Janus
15b0720f5e
lightning channel reserves
2019-08-20 09:03:10 +02:00
ThomasV
d9facabc8c
lnbase: call save_channel in revoke and receive_revoke
2019-08-20 09:03:10 +02:00
Janus
1f97a9753e
redeem htlc outputs of our local commitment transaction back to wallet
2019-08-20 09:03:10 +02:00
SomberNight
f70e679aba
some more type annotations that needed conditional imports
2019-08-20 09:03:10 +02:00
SomberNight
edff357fad
better handling of channel updates for private channels
2019-08-20 09:03:10 +02:00