mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
channeld: fix test code for tx fee calculation (inside #ifdef PRINT_ACTUAL_FEE
)
Has an out-by-one error, but only used for test-vector generation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
16735e1352
commit
c2a6de3042
@ -168,9 +168,9 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
|
|||||||
option_anchor_outputs, side))
|
option_anchor_outputs, side))
|
||||||
ok &= amount_sat_add(&out, out, amount_msat_to_sat_round_down(htlcs[i]->amount));
|
ok &= amount_sat_add(&out, out, amount_msat_to_sat_round_down(htlcs[i]->amount));
|
||||||
}
|
}
|
||||||
if (amount_msat_greater_sat(self_pay, dust_limit))
|
if (amount_msat_greater_eq_sat(self_pay, dust_limit))
|
||||||
ok &= amount_sat_add(&out, out, amount_msat_to_sat_round_down(self_pay));
|
ok &= amount_sat_add(&out, out, amount_msat_to_sat_round_down(self_pay));
|
||||||
if (amount_msat_greater_sat(other_pay, dust_limit))
|
if (amount_msat_greater_eq_sat(other_pay, dust_limit))
|
||||||
ok &= amount_sat_add(&out, out, amount_msat_to_sat_round_down(other_pay));
|
ok &= amount_sat_add(&out, out, amount_msat_to_sat_round_down(other_pay));
|
||||||
assert(ok);
|
assert(ok);
|
||||||
SUPERVERBOSE("# actual commitment transaction fee = %"PRIu64"\n",
|
SUPERVERBOSE("# actual commitment transaction fee = %"PRIu64"\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user