@@ -4222,13 +4222,13 @@ fn test_claim_sizeable_push_msat() {
4222
4222
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
4223
4223
4224
4224
mine_transaction ( & nodes[ 1 ] , & node_txn[ 0 ] ) ;
4225
- connect_blocks ( & nodes[ 1 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
4225
+ connect_blocks ( & nodes[ 1 ] , ( BREAKDOWN_TIMEOUT * 4 ) as u32 - 1 ) ;
4226
4226
4227
4227
let spend_txn = check_spendable_outputs ! ( nodes[ 1 ] , node_cfgs[ 1 ] . keys_manager) ;
4228
4228
assert_eq ! ( spend_txn. len( ) , 1 ) ;
4229
4229
assert_eq ! ( spend_txn[ 0 ] . input. len( ) , 1 ) ;
4230
4230
check_spends ! ( spend_txn[ 0 ] , node_txn[ 0 ] ) ;
4231
- assert_eq ! ( spend_txn[ 0 ] . input[ 0 ] . sequence. 0 , BREAKDOWN_TIMEOUT as u32 ) ;
4231
+ assert_eq ! ( spend_txn[ 0 ] . input[ 0 ] . sequence. 0 , ( BREAKDOWN_TIMEOUT * 4 ) as u32 ) ;
4232
4232
}
4233
4233
4234
4234
#[ test]
@@ -4894,14 +4894,14 @@ fn test_dynamic_spendable_outputs_local_htlc_success_tx() {
4894
4894
} ;
4895
4895
4896
4896
mine_transaction ( & nodes[ 1 ] , & node_tx) ;
4897
- connect_blocks ( & nodes[ 1 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
4897
+ connect_blocks ( & nodes[ 1 ] , ( BREAKDOWN_TIMEOUT * 4 ) as u32 - 1 ) ;
4898
4898
4899
4899
// Verify that B is able to spend its own HTLC-Success tx thanks to spendable output event given back by its ChannelMonitor
4900
4900
let spend_txn = check_spendable_outputs ! ( nodes[ 1 ] , node_cfgs[ 1 ] . keys_manager) ;
4901
4901
assert_eq ! ( spend_txn. len( ) , 1 ) ;
4902
4902
assert_eq ! ( spend_txn[ 0 ] . input. len( ) , 1 ) ;
4903
4903
check_spends ! ( spend_txn[ 0 ] , node_tx) ;
4904
- assert_eq ! ( spend_txn[ 0 ] . input[ 0 ] . sequence. 0 , BREAKDOWN_TIMEOUT as u32 ) ;
4904
+ assert_eq ! ( spend_txn[ 0 ] . input[ 0 ] . sequence. 0 , ( BREAKDOWN_TIMEOUT * 4 ) as u32 ) ;
4905
4905
}
4906
4906
4907
4907
fn do_test_fail_backwards_unrevoked_remote_announce ( deliver_last_raa : bool , announce_latest : bool ) {
@@ -5240,7 +5240,7 @@ fn test_dynamic_spendable_outputs_local_htlc_timeout_tx() {
5240
5240
} ;
5241
5241
5242
5242
mine_transaction ( & nodes[ 0 ] , & htlc_timeout) ;
5243
- connect_blocks ( & nodes[ 0 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
5243
+ connect_blocks ( & nodes[ 0 ] , ( BREAKDOWN_TIMEOUT * 4 ) as u32 - 1 ) ;
5244
5244
expect_payment_failed ! ( nodes[ 0 ] , our_payment_hash, false ) ;
5245
5245
5246
5246
// Verify that A is able to spend its own HTLC-Timeout tx thanks to spendable output event given back by its ChannelMonitor
@@ -5249,11 +5249,11 @@ fn test_dynamic_spendable_outputs_local_htlc_timeout_tx() {
5249
5249
check_spends ! ( spend_txn[ 0 ] , local_txn[ 0 ] ) ;
5250
5250
assert_eq ! ( spend_txn[ 1 ] . input. len( ) , 1 ) ;
5251
5251
check_spends ! ( spend_txn[ 1 ] , htlc_timeout) ;
5252
- assert_eq ! ( spend_txn[ 1 ] . input[ 0 ] . sequence. 0 , BREAKDOWN_TIMEOUT as u32 ) ;
5252
+ assert_eq ! ( spend_txn[ 1 ] . input[ 0 ] . sequence. 0 , ( BREAKDOWN_TIMEOUT * 4 ) as u32 ) ;
5253
5253
assert_eq ! ( spend_txn[ 2 ] . input. len( ) , 2 ) ;
5254
5254
check_spends ! ( spend_txn[ 2 ] , local_txn[ 0 ] , htlc_timeout) ;
5255
- assert ! ( spend_txn[ 2 ] . input[ 0 ] . sequence. 0 == BREAKDOWN_TIMEOUT as u32 ||
5256
- spend_txn[ 2 ] . input[ 1 ] . sequence. 0 == BREAKDOWN_TIMEOUT as u32 ) ;
5255
+ assert ! ( spend_txn[ 2 ] . input[ 0 ] . sequence. 0 == ( BREAKDOWN_TIMEOUT * 4 ) as u32 ||
5256
+ spend_txn[ 2 ] . input[ 1 ] . sequence. 0 == ( BREAKDOWN_TIMEOUT * 4 ) as u32 ) ;
5257
5257
}
5258
5258
5259
5259
#[ test]
@@ -5322,7 +5322,7 @@ fn test_key_derivation_params() {
5322
5322
} ;
5323
5323
5324
5324
mine_transaction ( & nodes[ 0 ] , & htlc_timeout) ;
5325
- connect_blocks ( & nodes[ 0 ] , BREAKDOWN_TIMEOUT as u32 - 1 ) ;
5325
+ connect_blocks ( & nodes[ 0 ] , ( BREAKDOWN_TIMEOUT * 4 ) as u32 - 1 ) ;
5326
5326
expect_payment_failed ! ( nodes[ 0 ] , our_payment_hash, false ) ;
5327
5327
5328
5328
// Verify that A is able to spend its own HTLC-Timeout tx thanks to spendable output event given back by its ChannelMonitor
@@ -5332,11 +5332,11 @@ fn test_key_derivation_params() {
5332
5332
check_spends ! ( spend_txn[ 0 ] , local_txn_1[ 0 ] ) ;
5333
5333
assert_eq ! ( spend_txn[ 1 ] . input. len( ) , 1 ) ;
5334
5334
check_spends ! ( spend_txn[ 1 ] , htlc_timeout) ;
5335
- assert_eq ! ( spend_txn[ 1 ] . input[ 0 ] . sequence. 0 , BREAKDOWN_TIMEOUT as u32 ) ;
5335
+ assert_eq ! ( spend_txn[ 1 ] . input[ 0 ] . sequence. 0 , ( BREAKDOWN_TIMEOUT * 4 ) as u32 ) ;
5336
5336
assert_eq ! ( spend_txn[ 2 ] . input. len( ) , 2 ) ;
5337
5337
check_spends ! ( spend_txn[ 2 ] , local_txn_1[ 0 ] , htlc_timeout) ;
5338
- assert ! ( spend_txn[ 2 ] . input[ 0 ] . sequence. 0 == BREAKDOWN_TIMEOUT as u32 ||
5339
- spend_txn[ 2 ] . input[ 1 ] . sequence. 0 == BREAKDOWN_TIMEOUT as u32 ) ;
5338
+ assert ! ( spend_txn[ 2 ] . input[ 0 ] . sequence. 0 == ( BREAKDOWN_TIMEOUT * 4 ) as u32 ||
5339
+ spend_txn[ 2 ] . input[ 1 ] . sequence. 0 == ( BREAKDOWN_TIMEOUT * 4 ) as u32 ) ;
5340
5340
}
5341
5341
5342
5342
#[ test]
@@ -5574,7 +5574,7 @@ fn bolt2_open_channel_sending_node_checks_part2() {
5574
5574
5575
5575
// BOLT #2 spec: Sending node should set to_self_delay sufficient to ensure the sender can irreversibly spend a commitment transaction output, in case of misbehaviour by the receiver.
5576
5576
assert ! ( BREAKDOWN_TIMEOUT >0 ) ;
5577
- assert ! ( node0_to_1_send_open_channel. to_self_delay==BREAKDOWN_TIMEOUT ) ;
5577
+ assert ! ( node0_to_1_send_open_channel. to_self_delay==BREAKDOWN_TIMEOUT * 4 ) ;
5578
5578
5579
5579
// BOLT #2 spec: Sending node must ensure the chain_hash value identifies the chain it wishes to open the channel within.
5580
5580
let chain_hash=genesis_block ( Network :: Testnet ) . header . block_hash ( ) ;
@@ -8889,7 +8889,7 @@ fn do_test_tx_confirmed_skipping_blocks_immediate_broadcast(test_height_before_t
8889
8889
8890
8890
let conf_height = nodes[ 1 ] . best_block_info ( ) . 1 ;
8891
8891
if !test_height_before_timelock {
8892
- connect_blocks ( & nodes[ 1 ] , 24 * 6 ) ;
8892
+ connect_blocks ( & nodes[ 1 ] , 24 * 6 * 4 ) ;
8893
8893
}
8894
8894
nodes[ 1 ] . chain_monitor . chain_monitor . transactions_confirmed (
8895
8895
& nodes[ 1 ] . get_block_header ( conf_height) , & [ ( 0 , & node_txn[ 0 ] ) ] , conf_height) ;
0 commit comments