Commit graph

12039 commits

Author SHA1 Message Date
ThomasV
dbe8b75659 move lnpay attempts logic to lnworker.pay 2019-08-20 09:03:11 +02:00
ThomasV
3349e941de lnsweep: minor fix 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
2b04cb3bc4 fix tests broken by previous commit 2019-08-20 09:03:11 +02:00
ThomasV
8d99fe8243 Let lnworker sweep HTLC outputs after breach, instead of lnwatcher 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
7be4cdaf18 redeem htlcs:
- fix bug in lnsweep: lnwatcher transactions were indexed by prev_txid
 - add test for breach remedy with unsettled htlcs
 - add timeout option to lnpay, and replace DO_NOT_SETTLE with SETTLE_DELAY
   so that we can read intermediate commitment tx in regtest
2019-08-20 09:03:11 +02:00
ThomasV
7418bd4552 lnsweep: simplify a few methods 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
acbb458ef7 set default to_self_delay to 1 day 2019-08-20 09:03:11 +02:00
SomberNight
9a0ba7fa79 ChannelDB: trivial bugfix for get_channels_for_node 2019-08-20 09:03:11 +02:00
ThomasV
c38afe8b07 add to_remote to breach test 2019-08-20 09:03:11 +02:00
ThomasV
765114faf7 add function new_blocks to simplify regtests 2019-08-20 09:03:11 +02:00
SomberNight
18a2a169c7 qt ChannelDetails: fix show_tx 2019-08-20 09:03:11 +02:00
SomberNight
6d8c605307 move lnworker.first_block to constants 2019-08-20 09:03:11 +02:00
SomberNight
a0764c017c lnpeer: process gossip in chunks 2019-08-20 09:03:11 +02:00
SomberNight
62f58c18fe ChannelDB.on_node_announcement: some speed-up
(e.g. for 100 node anns, was ~5 seconds, now 0.7 sec; so still slow)
2019-08-20 09:03:11 +02:00
SomberNight
cffb89002c fix ChannelDB.compare_channels: was raising "too many SQL variables"
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) too many SQL variables
2019-08-20 09:03:11 +02:00
SomberNight
60cd885f74 tests/regtest: stop using "bitcoin-cli generate" (deprecated) 2019-08-20 09:03:11 +02:00
ThomasV
84c6a464e8 gui: channel_details minor fix 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
669b84fbd6 gui channels_list fixes 2019-08-20 09:03:11 +02:00
ThomasV
32e517f407 improve lightning_dialog GUI settings 2019-08-20 09:03:11 +02:00
ThomasV
15eecab978 update electrumx starting script 2019-08-20 09:03:11 +02:00
ThomasV
a5570d94f3 channel blacklist: minor fix 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
0acd0c23d3 fix: key must be unique (sql) 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
eb4e6bb0de improve filter_channel_updates
blacklist channels that do not really get updated
2019-08-20 09:03:11 +02:00
ThomasV
f4b3d7627d query_short_channel_ids: use Event instead of Lock 2019-08-20 09:03:11 +02:00
ThomasV
d30e894aaf fix: add_channel_update 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
e68f318b12 verify node and channel announcements before entering sql lock 2019-08-20 09:03:11 +02:00
SomberNight
fbafc77f01 lnpeer query_short_channel_ids: BOLT-07 says ids must be sorted
this is why most remote peers were disconnecting upon receiving this msg
2019-08-20 09:03:11 +02:00
SomberNight
afc5717cf0 lnpeer reply_channel_range: handle lnd 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
b1f8c42424 post-rebase fix 2019-08-20 09:03:11 +02:00
ThomasV
f5c58c5e19 lightning network dialog 2019-08-20 09:03:11 +02:00
ThomasV
db60634774 use config instead of watchtower_window to decide if we close the app 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
670424f080 get_payments: do not include failed payments 2019-08-20 09:03:11 +02:00
ThomasV
2ec82433b4 wallet: add lnworker in constructor for CLI 2019-08-20 09:03:11 +02:00