ThomasV
b861e2e955
lnwatcher: save sweepstore in sqlite database
2019-08-20 09:03:11 +02:00
ThomasV
43d9e0460e
follow-up previous commit
2019-08-20 09:03:11 +02:00
ThomasV
8aa4ce0704
improve watchtower gui
2019-08-20 09:03:11 +02:00
ThomasV
f04e10f61a
save channel timestamps, and show lightning payments in history tab
2019-08-20 09:03:11 +02:00
ThomasV
19e60f00bb
add watchtower_window
2019-08-20 09:03:11 +02:00
Janus
38396e8ed4
lnwatcher: fix incorrect tuple unpacking in do_breach_remedy
2019-08-20 09:03:11 +02:00
ThomasV
b0f39718bb
remove useless returns and cryptic names
2019-08-20 09:03:11 +02:00
Janus
2c1fcb2f54
ln: remove EncumberedTransaction
2019-08-20 09:03:11 +02:00
ThomasV
729ddb8ec3
LNWatcher refactoring:
...
- do not store non-breach transactions
- send 'channel_open' and 'channel_closed' events
- force-closed channels are handled by LNWorker
2019-08-20 09:03:11 +02:00
ThomasV
0e3270a1d6
further simplify lnwatcher
2019-08-20 09:03:11 +02:00
SomberNight
595cfcbb65
move sweeping methods from lnchan.py to new file
...
also sweep "received" htlcs from "our" ctx
also sweep htlcs from their ctx (non-breach)
extract ctn; included_htlcs_in_their_latest_ctxs
2019-08-20 09:03:11 +02:00
ThomasV
88c6eeb966
make LNWatcher inherit AddressSynchronizer
2019-08-20 09:03:11 +02:00
Janus
6211e656a8
lnwatcher: do not get_transaction before broadcast
...
this workaround was inserted to avoid losing the interface
when rebroadcasting a transaction already in the mempool
many times. but since the network should make sure we always
have a interface ready, and this problem shouldn't happen on
mainnet, remove the workaround
2019-08-20 09:03:11 +02:00
Janus
c8dcf0b471
lnwatcher: more detailed logging, support notifying test suite of txs
2019-08-20 09:03:11 +02:00
Janus
795ba1f99d
lnwatcher: ensure probable spendability of prev_tx
...
previously, we would try to publish the second_stage
even if we couldn't, because a conflicting transaction
was published (like an htlc success when we close with
htlcs pending with a 1-hop payment and an online
counterparty)
2019-08-20 09:03:11 +02:00
Janus
f9f1805cdf
use IntEnum for TxMinedDepth
2019-08-20 09:03:11 +02:00
ThomasV
632f11d5da
watchtower: add watch_channel rpc
2019-08-20 09:03:11 +02:00
SomberNight
c0ae7b5534
after rebase clean-up
2019-08-20 09:03:10 +02:00
SomberNight
449ec013fe
add licence headers to more files
2019-08-20 09:03:10 +02:00
Janus
d6f62d4e7f
follow-up redeeming of local outgoing htlc outputs, fix tests
2019-08-20 09:03:10 +02:00
Janus
1f97a9753e
redeem htlc outputs of our local commitment transaction back to wallet
2019-08-20 09:03:10 +02:00
SomberNight
f70e679aba
some more type annotations that needed conditional imports
2019-08-20 09:03:10 +02:00
ThomasV
87fb0da5e1
minor fix
2019-08-20 09:03:10 +02:00
ThomasV
9362130fba
fix race between network and lnwatcher (network.add_job does not always work)
2019-08-20 09:03:10 +02:00
ThomasV
e761f5b876
add watchtower class, send encumbered tx as json
2019-08-20 09:03:10 +02:00
SomberNight
48252318b8
rebase follow-up
2019-08-20 09:03:10 +02:00
ThomasV
30753ed475
watchtower: use network job, catch exceptions
2019-08-20 09:03:10 +02:00
ThomasV
680b129b4a
remote watchtower: initial commit
2019-08-20 09:03:10 +02:00
Janus
94a10e6307
rebase fixup: use new broadcast_transaction API
2019-08-20 09:03:10 +02:00
SomberNight
029ec5a5ab
make our channels private, and put routing hints in invoices we create
2019-08-20 09:03:10 +02:00
ThomasV
4441233596
get rid of callbacks in lnwatcher, use network events instead
2019-08-20 09:03:10 +02:00
ThomasV
6e5b36e661
lnwatcher simplification: remove ctn tests and pubkeys
2019-08-20 09:03:10 +02:00
ThomasV
11c3ca281c
create sweep transaction outside of lnwatcher
2019-08-20 09:03:10 +02:00
SomberNight
72eb179c7a
fix race between lnwatcher/lnworker
...
channels were sometimes not getting re-established
2019-08-20 09:03:10 +02:00
Janus
5859054095
fix lnwatcher for channels initiated by remote
2019-08-20 09:03:10 +02:00
Janus
0405f0d9ad
accept channel opening requests initiated by remote
2019-08-20 09:03:10 +02:00
ThomasV
22b06ddec2
lnwatcher: fix parameters to broadcast_transaction
2019-08-20 09:03:10 +02:00
SomberNight
c91fe27e7d
fix lnwatcher: network triggers were renamed
2019-08-20 09:03:10 +02:00
ThomasV
5c5982d9f7
lnwatcher: do not assume addr_sync.synchronizer
2019-08-20 09:03:10 +02:00
Janus
261fefb6f3
lnwatcher rebased
2019-08-20 09:03:10 +02:00
Janus
3eabd70df5
lightning: post aiorpcx rebase fixup
2019-08-20 09:03:10 +02:00
SomberNight
1b030fca78
rebase follow-up: use namedtuples from master in new code (TxOutput, TxMinedStatus)
2019-08-20 09:03:10 +02:00
ThomasV
bb4aa1e135
lnwatcher: pass address instead of wallet reference
2019-08-20 09:03:10 +02:00
ThomasV
bc28edf178
encapsulate funding_address_for_channel
2019-08-20 09:03:10 +02:00
ThomasV
9897e41e68
remove unused method
2019-08-20 09:03:10 +02:00
SomberNight
66817d41f9
lnwatcher improvements
...
- only try sweeping csv-locked to_local if past timelock
- check if outputs are already spent
- no need to keep watching channels for which all outputs are spent and mined deep
2019-08-20 09:03:10 +02:00
Janus
35adc3231b
lightning: fixup after rebasing on restructured master
2019-08-20 09:03:10 +02:00