ThomasV
bd5c83e906
fix race condition with channel_timestamps
2019-08-20 09:03:12 +02:00
ThomasV
b493219829
require data loss protect
2019-08-20 09:03:12 +02:00
ThomasV
9f8e2c689e
test funding_txn_minimum_depth, show it in GUI
2019-08-20 09:03:12 +02:00
SomberNight
b1f606eaed
lnchannel: start using "latest" and "next" instead of "current" and "pending"
...
"current" used to be "oldest_unrevoked"; and pending was "oldest_unrevoked + 1"
but this was very confusing...
so now we have "oldest_unrevoked", "latest", and "next"
where "next" is "latest + 1"
"oldest_unrevoked" and "latest" are either the same or are offset by 1
(but caller should know which one they need)
rm "got_sig_for_next" - it was a redundant sanity check, that really
just complicated things
rm "local_commitment", "remote_commitment", "set_local_commitment",
"set_remote_commitment" - just use "get_latest_commitment" instead
2019-08-20 09:03:12 +02:00
SomberNight
e32807d29d
lnworker: only reestablish channels after on-chain state is synchronized
2019-08-20 09:03:12 +02:00
SomberNight
cd4268c521
lnworker: small clean-up of short_channel_id format
2019-08-20 09:03:12 +02:00
ThomasV
57ec8f51c8
lnpay: check whether invoice has been paid
2019-08-20 09:03:12 +02:00
ThomasV
f9a2e7eeb4
lnworker.get_invoice_status: test if invoice is expired
2019-08-20 09:03:12 +02:00
ThomasV
cac1e87286
use aiohttp+jsonrpcclient to sync with remote watchtower
2019-08-20 09:03:12 +02:00
ThomasV
740381e993
fix: remove unused parameter to add_sweep_tx
2019-08-20 09:03:12 +02:00
ThomasV
cd7ed4c59c
fix: constraints.feerate -> get_latest_feerate
2019-08-20 09:03:12 +02:00
ThomasV
f7c05f2602
Synchronize watchtower asynchronously:
...
- remove remote_commitment_to_be_revoked
- pass old ctns to lnsweep.create_sweeptxs_for_watchtower
- store the ctn of sweeptxs in sweepStore database
- request the highest ctn from sweepstore using get_ctn
- send sweeptxs asynchronously in LNWallet.sync_with_watchtower
2019-08-20 09:03:12 +02:00
SomberNight
4ccfa39fdd
cli: fix add_peer cmd
2019-08-20 09:03:12 +02:00
ThomasV
30e942bead
fix: delete from channel_db
2019-08-20 09:03:12 +02:00
ThomasV
2be68ac4d2
Use one LNWatcher instance per wallet
2019-08-20 09:03:12 +02:00
ThomasV
6b90d501ab
fix type: list
2019-08-20 09:03:12 +02:00
ThomasV
a8ce8109be
Perform breach remedy without sweepstore:
...
- add functions to lnsweep
- lnworker: analyze candidate ctx and htlc_tx
- watchtower will be optional
- add test for breach remedy with spent htlcs
- save tx name as label
2019-08-20 09:03:12 +02:00
ThomasV
f2d58d0e3f
optimize channel_db:
...
- use python objects mirrored by sql database
- write sql to file asynchronously
- the sql decorator is awaited in sweepstore, not in channel_db
2019-08-20 09:03:12 +02:00
ThomasV
a54cb30cf3
kivy: simplify open_channel dialog
2019-08-20 09:03:12 +02:00
ThomasV
115113f492
remove expensive sql request, python set comparison is faster
2019-08-20 09:03:12 +02:00
SomberNight
efc8948c00
lnworker: set DATA_LOSS_PROTECT flag for LNGossip too
...
otherwise peers disconnect
2019-08-20 09:03:12 +02:00
ThomasV
70cd29f9e1
GUI refactoring for Kivy and lightning.
...
This also touches Qt and wallet code.
2019-08-20 09:03:12 +02:00
ThomasV
1a23dcb8d5
display lightning payment attempts using signal
2019-08-20 09:03:12 +02:00
ThomasV
d477e3489f
lnworker: fix reestablish_peer_for_given_channel by passing chan explicitly
2019-08-20 09:03:12 +02:00
ThomasV
0913194a53
qt: add clear button to receive tab, show invoice right after it is added
2019-08-20 09:03:11 +02:00
ThomasV
b8d908d63e
lnworker improvements:
...
- enable option data_loss_protect
- separate add_peer from open_channel
- display exceptions raised in open_channel
2019-08-20 09:03:11 +02:00
ThomasV
d9b041e64d
encapsulate detect_who_closed in channel
2019-08-20 09:03:11 +02:00
ThomasV
24cc3599c7
lnworker: catch exceptions raised by add_future_tx
2019-08-20 09:03:11 +02:00
ThomasV
740ef09883
simplify_lnsweep
2019-08-20 09:03:11 +02:00
ThomasV
50479086b5
raise PaymentFailure in case of timeout (follow-up previous commit)
2019-08-20 09:03:11 +02:00
ThomasV
dbe8b75659
move lnpay attempts logic to lnworker.pay
2019-08-20 09:03:11 +02:00
ThomasV
81d340b19c
lnworker: do not create sweep transactions before outputs can be redeemed
2019-08-20 09:03:11 +02:00
ThomasV
3dacc525e6
on_network_update: check if channel is closed
2019-08-20 09:03:11 +02:00
ThomasV
6bbdbf7596
rework on_channel_closed in LNWorker:
...
- use detect_who_closed; this allows us to redeem to_remote of breach ctx
- do not redeem to_local of breach ctx, because it is redundant with lnwatcher
- rename a few methods
2019-08-20 09:03:11 +02:00
SomberNight
930d21c31c
channel close handling: detect situation based on output addresses
...
WIP...
2019-08-20 09:03:11 +02:00
SomberNight
6d8c605307
move lnworker.first_block to constants
2019-08-20 09:03:11 +02:00
ThomasV
a70441f0f1
minor fixes: remove_channel
2019-08-20 09:03:11 +02:00
ThomasV
6d9ef29690
redo LNWorker pay:
...
- wait until htlc has been fulfilled
- raise if htlc is not fulfilled
- return boolean success
- try multiple paths in GUI
2019-08-20 09:03:11 +02:00
ThomasV
fed6c96693
add option to remove channel after it has been closed
2019-08-20 09:03:11 +02:00
ThomasV
3c0df28c98
do not include 'force_closing' in channel states, because it is not part of the peer protocol
2019-08-20 09:03:11 +02:00
ThomasV
d30307b29e
gui: improve display of lightning status
2019-08-20 09:03:11 +02:00
ThomasV
b055eeace2
prune channels older than two weeks from database
2019-08-20 09:03:11 +02:00
ThomasV
522ce5bb9f
verify channel updates in peer's TaskGroup
2019-08-20 09:03:11 +02:00
ThomasV
308dc6aa6b
use a single queue for gossip messages, so that they are processed in the correct order
2019-08-20 09:03:11 +02:00
ThomasV
0e42fd9f17
parallelize short_channel_id requests
2019-08-20 09:03:11 +02:00
ThomasV
1011245c5e
LNGossip: sync channel db using query_channel_range
2019-08-20 09:03:11 +02:00
ThomasV
95376226e8
save lightning invoice descriptions as labels and allow user to edit them
2019-08-20 09:03:11 +02:00
ThomasV
e53ecb9b77
add labels to lightning history
2019-08-20 09:03:11 +02:00
ThomasV
c4081284bd
lightning: GUI improvements
2019-08-20 09:03:11 +02:00
ThomasV
9a3a63d18e
logging (follow-up rebase)
2019-08-20 09:03:11 +02:00