@@ -1400,7 +1400,7 @@ fn test_chan_reserve_violation_outbound_htlc_inbound_chan() {
14001400 let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
14011401
14021402 let mut push_amt = 100_000_000 ;
1403- push_amt -= feerate_per_kw as u64 * ( COMMITMENT_TX_BASE_WEIGHT + 4 * COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 * 1000 ;
1403+ push_amt -= commit_tx_fee_msat ( feerate_per_kw, 4 ) ;
14041404 push_amt -= Channel :: < EnforcingSigner > :: get_holder_selected_channel_reserve_satoshis ( 100_000 ) * 1000 ;
14051405
14061406 let _ = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 100_000 , push_amt, InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
@@ -1431,7 +1431,7 @@ fn test_chan_reserve_violation_inbound_htlc_outbound_channel() {
14311431 // channel reserve violation (so their balance is channel reserve (1000 sats) + commitment
14321432 // transaction fee with 0 HTLCs (183 sats)).
14331433 let mut push_amt = 100_000_000 ;
1434- push_amt -= feerate_per_kw as u64 * ( COMMITMENT_TX_BASE_WEIGHT + 4 * COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 * 1000 ;
1434+ push_amt -= commit_tx_fee_msat ( feerate_per_kw, 4 ) ;
14351435 push_amt -= Channel :: < EnforcingSigner > :: get_holder_selected_channel_reserve_satoshis ( 100_000 ) * 1000 ;
14361436 let chan = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 100_000 , push_amt, InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
14371437
@@ -1485,7 +1485,7 @@ fn test_chan_reserve_dust_inbound_htlcs_outbound_chan() {
14851485 // channel reserve violation (so their balance is channel reserve (1000 sats) + commitment
14861486 // transaction fee with 0 HTLCs (183 sats)).
14871487 let mut push_amt = 100_000_000 ;
1488- push_amt -= feerate_per_kw as u64 * ( COMMITMENT_TX_BASE_WEIGHT + 4 * COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 * 1000 ;
1488+ push_amt -= commit_tx_fee_msat ( feerate_per_kw, 4 ) ;
14891489 push_amt -= Channel :: < EnforcingSigner > :: get_holder_selected_channel_reserve_satoshis ( 100_000 ) * 1000 ;
14901490 create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 100000 , push_amt, InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
14911491
0 commit comments