@@ -4875,11 +4875,13 @@ fn test_claim_sizeable_push_msat() {
48754875 assert_eq ! ( node_txn[ 0 ] . output. len( ) , 2 ) ; // We can't force trimming of to_remote output as channel_reserve_satoshis block us to do so at channel opening
48764876
48774877 mine_transaction ( & nodes[ 1 ] , & node_txn[ 0 ] ) ;
4878- connect_blocks ( & nodes[ 1 ] , ANTI_REORG_DELAY - 1 ) ;
4878+ connect_blocks ( & nodes[ 1 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
48794879
48804880 let spend_txn = check_spendable_outputs ! ( nodes[ 1 ] , 1 , node_cfgs[ 1 ] . keys_manager, 100000 ) ;
48814881 assert_eq ! ( spend_txn. len( ) , 1 ) ;
4882+ assert_eq ! ( spend_txn[ 0 ] . input. len( ) , 1 ) ;
48824883 check_spends ! ( spend_txn[ 0 ] , node_txn[ 0 ] ) ;
4884+ assert_eq ! ( spend_txn[ 0 ] . input[ 0 ] . sequence, BREAKDOWN_TIMEOUT as u32 ) ;
48834885}
48844886
48854887#[ test]
@@ -5507,12 +5509,14 @@ fn test_dynamic_spendable_outputs_local_htlc_success_tx() {
55075509 } ;
55085510
55095511 mine_transaction ( & nodes[ 1 ] , & node_tx) ;
5510- connect_blocks ( & nodes[ 1 ] , ANTI_REORG_DELAY - 1 ) ;
5512+ connect_blocks ( & nodes[ 1 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
55115513
55125514 // Verify that B is able to spend its own HTLC-Success tx thanks to spendable output event given back by its ChannelMonitor
55135515 let spend_txn = check_spendable_outputs ! ( nodes[ 1 ] , 1 , node_cfgs[ 1 ] . keys_manager, 100000 ) ;
55145516 assert_eq ! ( spend_txn. len( ) , 1 ) ;
5517+ assert_eq ! ( spend_txn[ 0 ] . input. len( ) , 1 ) ;
55155518 check_spends ! ( spend_txn[ 0 ] , node_tx) ;
5519+ assert_eq ! ( spend_txn[ 0 ] . input[ 0 ] . sequence, BREAKDOWN_TIMEOUT as u32 ) ;
55165520}
55175521
55185522fn do_test_fail_backwards_unrevoked_remote_announce ( deliver_last_raa : bool , announce_latest : bool ) {
@@ -5802,15 +5806,20 @@ fn test_dynamic_spendable_outputs_local_htlc_timeout_tx() {
58025806 } ;
58035807
58045808 mine_transaction ( & nodes[ 0 ] , & htlc_timeout) ;
5805- connect_blocks ( & nodes[ 0 ] , ANTI_REORG_DELAY - 1 ) ;
5809+ connect_blocks ( & nodes[ 0 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
58065810 expect_payment_failed ! ( nodes[ 0 ] , our_payment_hash, true ) ;
58075811
58085812 // Verify that A is able to spend its own HTLC-Timeout tx thanks to spendable output event given back by its ChannelMonitor
58095813 let spend_txn = check_spendable_outputs ! ( nodes[ 0 ] , 1 , node_cfgs[ 0 ] . keys_manager, 100000 ) ;
58105814 assert_eq ! ( spend_txn. len( ) , 3 ) ;
58115815 check_spends ! ( spend_txn[ 0 ] , local_txn[ 0 ] ) ;
5816+ assert_eq ! ( spend_txn[ 1 ] . input. len( ) , 1 ) ;
58125817 check_spends ! ( spend_txn[ 1 ] , htlc_timeout) ;
5818+ assert_eq ! ( spend_txn[ 1 ] . input[ 0 ] . sequence, BREAKDOWN_TIMEOUT as u32 ) ;
5819+ assert_eq ! ( spend_txn[ 2 ] . input. len( ) , 2 ) ;
58135820 check_spends ! ( spend_txn[ 2 ] , local_txn[ 0 ] , htlc_timeout) ;
5821+ assert ! ( spend_txn[ 2 ] . input[ 0 ] . sequence == BREAKDOWN_TIMEOUT as u32 ||
5822+ spend_txn[ 2 ] . input[ 1 ] . sequence == BREAKDOWN_TIMEOUT as u32 ) ;
58145823}
58155824
58165825#[ test]
@@ -5877,16 +5886,21 @@ fn test_key_derivation_params() {
58775886 } ;
58785887
58795888 mine_transaction ( & nodes[ 0 ] , & htlc_timeout) ;
5880- connect_blocks ( & nodes[ 0 ] , ANTI_REORG_DELAY - 1 ) ;
5889+ connect_blocks ( & nodes[ 0 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
58815890 expect_payment_failed ! ( nodes[ 0 ] , our_payment_hash, true ) ;
58825891
58835892 // Verify that A is able to spend its own HTLC-Timeout tx thanks to spendable output event given back by its ChannelMonitor
58845893 let new_keys_manager = test_utils:: TestKeysInterface :: new ( & seed, Network :: Testnet ) ;
58855894 let spend_txn = check_spendable_outputs ! ( nodes[ 0 ] , 1 , new_keys_manager, 100000 ) ;
58865895 assert_eq ! ( spend_txn. len( ) , 3 ) ;
58875896 check_spends ! ( spend_txn[ 0 ] , local_txn_1[ 0 ] ) ;
5897+ assert_eq ! ( spend_txn[ 1 ] . input. len( ) , 1 ) ;
58885898 check_spends ! ( spend_txn[ 1 ] , htlc_timeout) ;
5899+ assert_eq ! ( spend_txn[ 1 ] . input[ 0 ] . sequence, BREAKDOWN_TIMEOUT as u32 ) ;
5900+ assert_eq ! ( spend_txn[ 2 ] . input. len( ) , 2 ) ;
58895901 check_spends ! ( spend_txn[ 2 ] , local_txn_1[ 0 ] , htlc_timeout) ;
5902+ assert ! ( spend_txn[ 2 ] . input[ 0 ] . sequence == BREAKDOWN_TIMEOUT as u32 ||
5903+ spend_txn[ 2 ] . input[ 1 ] . sequence == BREAKDOWN_TIMEOUT as u32 ) ;
58905904}
58915905
58925906#[ test]
0 commit comments