From d885407e3e91fb64b5402aab46299dfc322726a6 Mon Sep 17 00:00:00 2001 From: niftynei Date: Tue, 19 Jul 2022 17:04:38 +0930 Subject: [PATCH] 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` --- onchaind/onchaind.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/onchaind/onchaind.c b/onchaind/onchaind.c index f144f04ce..4cd20023f 100644 --- a/onchaind/onchaind.c +++ b/onchaind/onchaind.c @@ -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",