mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
onchaind: use lightningd to sign and broadcast htlc expired txs.
This is when they closed the channel, we can simply make our own tx to expire the HTLC. (The other case is where we closed the channel, and we have a special htlc_timeout tx which we have their signature for). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1332,13 +1332,12 @@ def test_forward_event_notification(node_factory, bitcoind, executor):
|
||||
l2.daemon.wait_for_log(' to ONCHAIN')
|
||||
l5.daemon.wait_for_log(' to ONCHAIN')
|
||||
|
||||
l2.daemon.wait_for_log('Propose handling THEIR_UNILATERAL/OUR_HTLC by OUR_HTLC_TIMEOUT_TO_US .* after 6 blocks')
|
||||
bitcoind.generate_block(6)
|
||||
((_, txid, blocks),) = l2.wait_for_onchaind_tx('OUR_HTLC_TIMEOUT_TO_US',
|
||||
'THEIR_UNILATERAL/OUR_HTLC')
|
||||
assert blocks == 5
|
||||
bitcoind.generate_block(5)
|
||||
|
||||
l2.wait_for_onchaind_broadcast('OUR_HTLC_TIMEOUT_TO_US',
|
||||
'THEIR_UNILATERAL/OUR_HTLC')
|
||||
|
||||
bitcoind.generate_block(1)
|
||||
bitcoind.generate_block(1, wait_for_mempool=txid)
|
||||
l2.daemon.wait_for_log('Resolved THEIR_UNILATERAL/OUR_HTLC by our proposal OUR_HTLC_TIMEOUT_TO_US')
|
||||
l5.daemon.wait_for_log('Ignoring output.*: OUR_UNILATERAL/THEIR_HTLC')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user