@@ -2296,17 +2296,13 @@ fn do_test_restored_packages_retry(check_old_monitor_retries_after_upgrade: bool
22962296 }
22972297
22982298 // Connecting more blocks should result in the HTLC transactions being rebroadcast.
2299- connect_blocks ( & nodes[ 0 ] , 6 ) ;
2299+ connect_blocks ( & nodes[ 0 ] , crate :: chain :: package :: LOW_FREQUENCY_BUMP_INTERVAL ) ;
23002300 if check_old_monitor_retries_after_upgrade {
23012301 check_added_monitors ( & nodes[ 0 ] , 1 ) ;
23022302 }
23032303 {
23042304 let txn = nodes[ 0 ] . tx_broadcaster . txn_broadcast ( ) ;
2305- if !nodes[ 0 ] . connect_style . borrow ( ) . skips_blocks ( ) {
2306- assert_eq ! ( txn. len( ) , 6 ) ;
2307- } else {
2308- assert ! ( txn. len( ) < 6 ) ;
2309- }
2305+ assert_eq ! ( txn. len( ) , 1 ) ;
23102306 for tx in txn {
23112307 assert_eq ! ( tx. input. len( ) , htlc_timeout_tx. input. len( ) ) ;
23122308 assert_eq ! ( tx. output. len( ) , htlc_timeout_tx. output. len( ) ) ;
@@ -2420,9 +2416,9 @@ fn do_test_monitor_rebroadcast_pending_claims(anchors: bool) {
24202416 connect_blocks ( & nodes[ 0 ] , 1 ) ;
24212417 check_htlc_retry ( true , false ) ;
24222418
2423- // Connect one more block , expecting a retry with a fee bump. Unfortunately, we cannot bump HTLC
2424- // transactions pre-anchors.
2425- connect_blocks ( & nodes[ 0 ] , 1 ) ;
2419+ // Connect a few more blocks , expecting a retry with a fee bump. Unfortunately, we cannot bump
2420+ // HTLC transactions pre-anchors.
2421+ connect_blocks ( & nodes[ 0 ] , crate :: chain :: package :: LOW_FREQUENCY_BUMP_INTERVAL ) ;
24262422 check_htlc_retry ( true , anchors) ;
24272423
24282424 // Trigger a call and we should have another retry, but without a bump.
@@ -2434,20 +2430,13 @@ fn do_test_monitor_rebroadcast_pending_claims(anchors: bool) {
24342430 nodes[ 0 ] . chain_monitor . chain_monitor . rebroadcast_pending_claims ( ) ;
24352431 check_htlc_retry ( true , anchors) ;
24362432
2437- // Connect one more block , expecting a retry with a fee bump. Unfortunately, we cannot bump HTLC
2438- // transactions pre-anchors.
2439- connect_blocks ( & nodes[ 0 ] , 1 ) ;
2433+ // Connect a few more blocks , expecting a retry with a fee bump. Unfortunately, we cannot bump
2434+ // HTLC transactions pre-anchors.
2435+ connect_blocks ( & nodes[ 0 ] , crate :: chain :: package :: LOW_FREQUENCY_BUMP_INTERVAL ) ;
24402436 let htlc_tx = check_htlc_retry ( true , anchors) . unwrap ( ) ;
24412437
24422438 // Mine the HTLC transaction to ensure we don't retry claims while they're confirmed.
24432439 mine_transaction ( & nodes[ 0 ] , & htlc_tx) ;
2444- // If we have a `ConnectStyle` that advertises the new block first without the transactions,
2445- // we'll receive an extra bumped claim.
2446- if nodes[ 0 ] . connect_style . borrow ( ) . updates_best_block_first ( ) {
2447- nodes[ 0 ] . wallet_source . add_utxo ( bitcoin:: OutPoint { txid : coinbase_tx. compute_txid ( ) , vout : 0 } , coinbase_tx. output [ 0 ] . value ) ;
2448- nodes[ 0 ] . wallet_source . remove_utxo ( bitcoin:: OutPoint { txid : htlc_tx. compute_txid ( ) , vout : 1 } ) ;
2449- check_htlc_retry ( true , anchors) ;
2450- }
24512440 nodes[ 0 ] . chain_monitor . chain_monitor . rebroadcast_pending_claims ( ) ;
24522441 check_htlc_retry ( false , false ) ;
24532442}
0 commit comments