mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
db: store claimed per_commitment_point from option_data_loss_protect.
This means we don't try to unilaterally close after a restart, *and* we can tell onchaind to try to use the point to recover funds when the peer unilaterally closes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
1a4084442b
commit
a5ecc95c42
@@ -1219,6 +1219,11 @@ def test_dataloss_protection(node_factory, bitcoind):
|
||||
# l2 should still recover something!
|
||||
bitcoind.generate_block(1)
|
||||
|
||||
l2.daemon.wait_for_log("ERROR: Unknown commitment #2, recovering our funds!")
|
||||
|
||||
# Restarting l2, and it should remember from db.
|
||||
l2.restart()
|
||||
|
||||
l2.daemon.wait_for_log("ERROR: Unknown commitment #2, recovering our funds!")
|
||||
bitcoind.generate_block(100)
|
||||
l2.daemon.wait_for_log('WIRE_ONCHAIN_ALL_IRREVOCABLY_RESOLVED')
|
||||
|
||||
Reference in New Issue
Block a user