Skip to content

Commit 85f406a

Browse files
Update lightning/src/events/bump_transaction.rs
Co-authored-by: Matt Corallo <[email protected]>
1 parent 381ff40 commit 85f406a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lightning/src/events/bump_transaction.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -884,11 +884,8 @@ where
884884
let expected_signed_tx_weight = unsigned_tx_weight + total_satisfaction_weight;
885885
// Our estimate should be within a 1% error margin of the actual weight and we should
886886
// never underestimate.
887-
assert!(
888-
expected_signed_tx_weight >= signed_tx_weight
889-
&& expected_signed_tx_weight - (expected_signed_tx_weight / 100)
890-
<= signed_tx_weight
891-
);
887+
assert!(expected_signed_tx_weight >= signed_tx_weight
888+
assert!(expected_signed_tx_weight * 99 / 100 <= signed_tx_weight);
892889

893890
let expected_signed_tx_fee =
894891
fee_for_weight(target_feerate_sat_per_1000_weight, signed_tx_weight);

0 commit comments

Comments
 (0)