bkpr, elements: elements tx have one extra output for fees

if it's an elements chain, subtract one from the output count

we wait to calculate fees for a channel close until all the outputs are
accounted for, but elements chains create a separate output for the
amount of fees that are paid on a tx.

fixes crash in `test_penalty_rbf_burn`
This commit is contained in:
niftynei 2022-07-19 17:04:38 +09:30 committed by Rusty Russell
parent 2b3ef37590
commit d885407e3e

View File

@ -3915,6 +3915,9 @@ int main(int argc, char *argv[])
&funding, tx_blockheight,
our_msat,
funding_sats,
is_elements(chainparams) ?
/* Minus 1, fee output */
tal_count(tx->outputs) - 1 :
tal_count(tx->outputs))));
status_debug("Remote per-commit point: %s",