ThomasV
2f31e9fa44
follow-up prev commit
6 years ago
ThomasV
3d69f3b0be
improve payment status callbacks:
...
- add 'computing route' status for lightning payments
- use separate callbacks for invoice status and payment popups
- show payment error and payment logs in kivy
6 years ago
SomberNight
c95c0dcb80
lnrouter: add comments about path-finding blocking the asyncio loop
6 years ago
ThomasV
8b63f7176e
Add short channel id to tx labels
6 years ago
SomberNight
ec7473789e
lnhtlc: speed-up methods for recent ctns
...
we maintain a set of interesting htlc_ids
6 years ago
ThomasV
2c617c3b00
move feerate warning to lnpeer
6 years ago
SomberNight
35a8812534
lnworker.reestablish_peer_for_given_channel: give each addr a chance
...
follow-up fa0ef9c548
6 years ago
ThomasV
b609088115
follow-up previous commit: broadcast_transaction does not return txid
6 years ago
ThomasV
888a6d726e
Propagate exceptions raise by force_close to the GUI.
...
Define 'try_force_closing' for cases where we do not
want exceptions to be raised.
6 years ago
ThomasV
15fb8c0415
allow transition from FORCE_CLOSING to REDEEMED. define REDEEM_AFTER_DOUBLE_SPENT_DELAY
6 years ago
SomberNight
fa0ef9c548
ln: store network addresses for channel counterparties in channels
...
So we can reconnect to them without relying on gossip db.
6 years ago
ThomasV
cb14bde422
fix test_lnpeer
6 years ago
ThomasV
7f3542f080
lnworker: set invoice status if htlcs are received from previous session
6 years ago
ThomasV
8f3fcdd1a8
Fix detection of payments.
...
1. In lnhtlc, sent_in_ctn and failed_in_ctn need to look at the
remote ctx, and they need to be called when we receive a revocation,
not when we send one.
2. In lnchannel, we use 3 lnworker callbacks:
- payment sent/payment failed (called when we receive a revocation)
- payment received (called when we send a revocation)
3. Make revoke_current_commitment return a single value.
The second value was only used in tests, there is no need
to bloat the code with that
6 years ago
ThomasV
b9eaba3e85
replace await_local/remote
6 years ago
SomberNight
dae842e2ad
tests: made TestLNTransport.test_loop more robust
6 years ago
SomberNight
7962e17df6
invoices: deal with expiration of "0" mess
...
Internally, we've been using an expiration of 0 to mean "never expires".
For LN invoices, BOLT-11 does not specify what an expiration of 0 means.
Other clients seem to treat it as "0 seconds" (i.e. already expired).
This means there is no way to create a BOLT-11 invoice that "never" expires.
For LN invoices,
- we now treat an expiration of 0, , as "0 seconds",
- when creating an invoice, if the user selected never, we will put 100 years as expiration
6 years ago
SomberNight
01981f71fb
lnworker.add_peer: don't block event loop with DNS
6 years ago
SomberNight
fbd0c9aae8
lnworker: peer-bootstrapping: add IPv6 fallback nodes
6 years ago
SomberNight
59a428ea7f
lnworker: re-enable dns seeds for peer-finding bootstrap
...
but only for mainnet
6 years ago
SomberNight
a97e7bae05
ChannelDB: make gossip sync progress updates cheaper
...
get_num_channels_partitioned_by_policy_count() was too slow
6 years ago
ThomasV
f801307a08
move htlc_switch task to lnpeer
6 years ago
ThomasV
5d3bca7bb8
htlc_switch: decouple maybe_send_commitment from htlc processing
6 years ago
ThomasV
cfc20845a2
lnworker: dissociate htlc forwarding and fulfillment
6 years ago
ThomasV
09675bd911
make maybe_fulfill_htlc, maybe_forward_htlc synchronous.
...
move async operations to lnworker.htlc_switch
6 years ago
ThomasV
d827aedd16
lnpeer: do not drop channel updates if cannot send
6 years ago
ThomasV
da67fda92a
HTLC switch:
...
- fulfills/fails/forwards HTLCs
- onion_packets are saved when update_add_htlc is received
6 years ago
SomberNight
c7704fb8ee
lnworker: allow changing labels of chan-open/chan-close txns
6 years ago
SomberNight
67d24bf129
add LN gossip sync progress estimate indicator to Qt GUI
6 years ago
SomberNight
a32af44ff9
trivial clean-up (typing/imports)
6 years ago
ThomasV
077f778632
Replace lightning_settle_delay with enable_htlc_settle (asyncio.Event)
6 years ago
SomberNight
b21bcf5977
taskgroups: don't log CancelledError
6 years ago
SomberNight
ed234d3444
rename all TaskGroup() fields to "taskgroup"
...
for consistency
6 years ago
SomberNight
c8260249b0
lnworker: add own taskgroup (run in daemon.taskgroup)
6 years ago
ThomasV
34400c0710
Set channel state to OPENING as soon as we receive 'funding_signed',
...
instead of when the funding transaction has been broadcast, because
we have no reliable way to know when it will be broadcast.
6 years ago
SomberNight
9d1fa4cc99
(trivial) lnworker: move LNGossip.peer_closed to parent class
6 years ago
ThomasV
1c5dc79298
shutdown:
...
- resend shutdown on reestablish
- wait until no more pending updates before sending shutdown
6 years ago
SomberNight
3966b51a94
fix undefined name 'CHANNEL_INIT_TIMEOUT'
6 years ago
ThomasV
8ff1921c0d
(minor) fix log
6 years ago
ThomasV
5785c2fa2f
Fix #5975 : Forget or redeem channels that are never funded.
...
- initiator: wait until double spent
- non-initiator: wait until timeout
6 years ago
ThomasV
20d8da7e24
db upgrade: store channel tx height and timestamps in 'channels'
6 years ago
ThomasV
e8ee4250d9
Do not save new channels before they are added to lnworker
6 years ago
ThomasV
947211fe4e
follow-up 54ef6db762b5ea120a59af0a2470eac999c55d93: set channel state to OPENING if funding tx was broadcast later (e.g. cold storage)
6 years ago
SomberNight
cc5624fb20
don't raise BaseException
6 years ago
ThomasV
54ef6db762
do not try to reestablish channels in PREOPENING state (per BOLT2).
6 years ago
ThomasV
64a8de8bae
Qt: show amounts sent to channels in show_transaction
6 years ago
ThomasV
fa62d03c2a
require option static_remotekey in lnwallet
6 years ago
ThomasV
bda23ef73d
Use a Future for lnpeer.initialized, so that exceptions are passed to the GUI
6 years ago
ThomasV
1b586faec9
disable peer filtering in lnworker
6 years ago
ThomasV
55e0e1a72e
Generate channel keys from random seed
6 years ago