ThomasV
94fe28b576
regtest: remove cost limit
6 years ago
ThomasV
c7b9bdc5f5
lnwatcher: wait until lnwatcher is fully synchronized before check_onchain_situation
6 years ago
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
6 years ago
ThomasV
238f3c949c
get rid of sql_alchemy
6 years ago
ThomasV
0eab1692d6
Do not store message payloads in channel db.
Use single primary key for addresses.
6 years ago
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
6 years ago
ThomasV
180f6d34be
separate channel_db module
6 years ago
ThomasV
06b5299b0f
comment out convert, add logging statement
6 years ago
ThomasV
a54cb30cf3
kivy: simplify open_channel dialog
6 years ago
SomberNight
c15267e1f6
pycryptodomex for android
6 years ago
ThomasV
115113f492
remove expensive sql request, python set comparison is faster
6 years ago
ThomasV
af7d7e883c
Rework wallet history methods:
- wallet.get_full_history returns onchain and lightning
- capital gains are returned by get_detailed_history
- display lightning history in kivy
- command line: separate lightning and onchain history
6 years ago
SomberNight
7e8be3d2e7
lnpeer: some exception handling clean up
main_loop should dump traces of unexpected exceptions to log.
Coroutines/functions invoked inside main_loop should simply propagate it
up the chain.
Typical exceptions are handled in handle_disconnect without dumping the trace.
6 years ago
SomberNight
efc8948c00
lnworker: set DATA_LOSS_PROTECT flag for LNGossip too
otherwise peers disconnect
6 years ago
SomberNight
e6fc8868b1
qt channels list: add "short channel id" column
6 years ago
SomberNight
aa4027298f
do not "import *"
6 years ago
SomberNight
3413eb05b9
qt ChannelsList: some clean-up
6 years ago
SomberNight
5e3e3e41a1
qt receive tab: fix update_receive_address_styling
6 years ago
SomberNight
63217c1ca7
qt main window: hide "Channels" tab if lightning is disabled
6 years ago
ThomasV
70cd29f9e1
GUI refactoring for Kivy and lightning.
This also touches Qt and wallet code.
6 years ago
ThomasV
1a23dcb8d5
display lightning payment attempts using signal
6 years ago
ThomasV
049857d528
on_revoke_and_ack: be robust to exceptions raised in lnwatcher
6 years ago
ThomasV
dff1822c37
fix watchtower: sweep_tx must not be None
6 years ago
ThomasV
d477e3489f
lnworker: fix reestablish_peer_for_given_channel by passing chan explicitly
6 years ago
ThomasV
0f00f4f655
fix encode_msg: optional fields were not sent
6 years ago
ThomasV
67f1ade798
send data_loss_protect fields if we support it
6 years ago
ThomasV
9eddb9844c
on_commitment_signed: distinguish between exceptions
6 years ago
ThomasV
0913194a53
qt: add clear button to receive tab, show invoice right after it is added
6 years ago
ThomasV
234591624e
request_lists: remove non-sense
6 years ago
ThomasV
b8d908d63e
lnworker improvements:
- enable option data_loss_protect
- separate add_peer from open_channel
- display exceptions raised in open_channel
6 years ago
ThomasV
d2dfa8c558
regtest: use while loops instead of fine-tuned delays
6 years ago
ThomasV
d9b041e64d
encapsulate detect_who_closed in channel
6 years ago
ThomasV
24cc3599c7
lnworker: catch exceptions raised by add_future_tx
6 years ago
ThomasV
740ef09883
simplify_lnsweep
6 years ago
ThomasV
9abbd077a5
lnhtlc: use boolean instead of int in ctn_latest
6 years ago
SomberNight
69bffac86a
lnhtlc: fix adding htlc between sending commitment_signed and receiving revoke_and_ack
6 years ago
ThomasV
50479086b5
raise PaymentFailure in case of timeout (follow-up previous commit)
6 years ago
ThomasV
dbe8b75659
move lnpay attempts logic to lnworker.pay
6 years ago
ThomasV
3349e941de
lnsweep: minor fix
6 years ago
ThomasV
81d340b19c
lnworker: do not create sweep transactions before outputs can be redeemed
6 years ago
ThomasV
2b04cb3bc4
fix tests broken by previous commit
6 years ago
ThomasV
8d99fe8243
Let lnworker sweep HTLC outputs after breach, instead of lnwatcher
6 years ago
ThomasV
3dacc525e6
on_network_update: check if channel is closed
6 years ago
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
6 years ago
ThomasV
7418bd4552
lnsweep: simplify a few methods
6 years ago
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
6 years ago
SomberNight
930d21c31c
channel close handling: detect situation based on output addresses
WIP...
6 years ago
SomberNight
acbb458ef7
set default to_self_delay to 1 day
6 years ago
SomberNight
9a0ba7fa79
ChannelDB: trivial bugfix for get_channels_for_node
6 years ago
ThomasV
c38afe8b07
add to_remote to breach test
6 years ago