@@ -2296,17 +2296,13 @@ fn do_test_restored_packages_retry(check_old_monitor_retries_after_upgrade: bool
2296
2296
}
2297
2297
2298
2298
// 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 ) ;
2300
2300
if check_old_monitor_retries_after_upgrade {
2301
2301
check_added_monitors ( & nodes[ 0 ] , 1 ) ;
2302
2302
}
2303
2303
{
2304
2304
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 ) ;
2310
2306
for tx in txn {
2311
2307
assert_eq ! ( tx. input. len( ) , htlc_timeout_tx. input. len( ) ) ;
2312
2308
assert_eq ! ( tx. output. len( ) , htlc_timeout_tx. output. len( ) ) ;
@@ -2420,9 +2416,9 @@ fn do_test_monitor_rebroadcast_pending_claims(anchors: bool) {
2420
2416
connect_blocks ( & nodes[ 0 ] , 1 ) ;
2421
2417
check_htlc_retry ( true , false ) ;
2422
2418
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 ) ;
2426
2422
check_htlc_retry ( true , anchors) ;
2427
2423
2428
2424
// 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) {
2434
2430
nodes[ 0 ] . chain_monitor . chain_monitor . rebroadcast_pending_claims ( ) ;
2435
2431
check_htlc_retry ( true , anchors) ;
2436
2432
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 ) ;
2440
2436
let htlc_tx = check_htlc_retry ( true , anchors) . unwrap ( ) ;
2441
2437
2442
2438
// Mine the HTLC transaction to ensure we don't retry claims while they're confirmed.
2443
2439
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
- }
2451
2440
nodes[ 0 ] . chain_monitor . chain_monitor . rebroadcast_pending_claims ( ) ;
2452
2441
check_htlc_retry ( false , false ) ;
2453
2442
}
0 commit comments