@@ -1392,9 +1392,7 @@ fn test_chan_reserve_violation_outbound_htlc_inbound_chan() {
1392
1392
// sending any above-dust amount would result in a channel reserve violation.
1393
1393
// In this test we check that we would be prevented from sending an HTLC in
1394
1394
// this situation.
1395
- let feerate_per_kw = 253 ;
1396
- chanmon_cfgs[ 0 ] . fee_estimator = test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( feerate_per_kw) } ;
1397
- chanmon_cfgs[ 1 ] . fee_estimator = test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( feerate_per_kw) } ;
1395
+ let feerate_per_kw = * chanmon_cfgs[ 0 ] . fee_estimator . sat_per_kw . lock ( ) . unwrap ( ) ;
1398
1396
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1399
1397
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
1400
1398
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -1422,7 +1420,7 @@ fn test_chan_reserve_violation_outbound_htlc_inbound_chan() {
1422
1420
#[ test]
1423
1421
fn test_chan_reserve_violation_inbound_htlc_outbound_channel ( ) {
1424
1422
let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
1425
- let feerate_per_kw = 253 ;
1423
+ let feerate_per_kw = * chanmon_cfgs [ 0 ] . fee_estimator . sat_per_kw . lock ( ) . unwrap ( ) ;
1426
1424
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1427
1425
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
1428
1426
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -1473,9 +1471,7 @@ fn test_chan_reserve_dust_inbound_htlcs_outbound_chan() {
1473
1471
// Test that if we receive many dust HTLCs over an outbound channel, they don't count when
1474
1472
// calculating our commitment transaction fee (this was previously broken).
1475
1473
let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
1476
- let feerate_per_kw = 253 ;
1477
- chanmon_cfgs[ 0 ] . fee_estimator = test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( feerate_per_kw) } ;
1478
- chanmon_cfgs[ 1 ] . fee_estimator = test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( feerate_per_kw) } ;
1474
+ let feerate_per_kw = * chanmon_cfgs[ 0 ] . fee_estimator . sat_per_kw . lock ( ) . unwrap ( ) ;
1479
1475
1480
1476
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1481
1477
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None , None ] ) ;
0 commit comments