Commit graph

11462 commits

Author SHA1 Message Date
SomberNight
e6fc8868b1 qt channels list: add "short channel id" column 2019-08-20 09:03:12 +02:00
SomberNight
aa4027298f do not "import *" 2019-08-20 09:03:12 +02:00
SomberNight
3413eb05b9 qt ChannelsList: some clean-up 2019-08-20 09:03:12 +02:00
SomberNight
5e3e3e41a1 qt receive tab: fix update_receive_address_styling 2019-08-20 09:03:12 +02:00
SomberNight
63217c1ca7 qt main window: hide "Channels" tab if lightning is disabled 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
049857d528 on_revoke_and_ack: be robust to exceptions raised in lnwatcher 2019-08-20 09:03:12 +02:00
ThomasV
dff1822c37 fix watchtower: sweep_tx must not be None 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
0f00f4f655 fix encode_msg: optional fields were not sent 2019-08-20 09:03:12 +02:00
ThomasV
67f1ade798 send data_loss_protect fields if we support it 2019-08-20 09:03:12 +02:00
ThomasV
9eddb9844c on_commitment_signed: distinguish between exceptions 2019-08-20 09:03:11 +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
234591624e request_lists: remove non-sense 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
d2dfa8c558 regtest: use while loops instead of fine-tuned delays 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
9abbd077a5 lnhtlc: use boolean instead of int in ctn_latest 2019-08-20 09:03:11 +02:00
SomberNight
69bffac86a lnhtlc: fix adding htlc between sending commitment_signed and receiving revoke_and_ack 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
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