From 57ebe9d499bc6cef40d91226fd0583499a1df94d Mon Sep 17 00:00:00 2001 From: evansmj Date: Thu, 14 Dec 2023 13:11:15 -0500 Subject: [PATCH] Remove grouping by update_count in finding onchain fees Remove grouping by update_count which resulted in a crash due to bad arithmetic caused by fee calculation returned rows not being consolidated. Remove xfail. --- plugins/bkpr/recorder.c | 2 +- tests/test_bookkeeper.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/bkpr/recorder.c b/plugins/bkpr/recorder.c index bc72093b904b..5f293a24597a 100644 --- a/plugins/bkpr/recorder.c +++ b/plugins/bkpr/recorder.c @@ -342,7 +342,7 @@ struct fee_sum **find_account_onchain_fees(const tal_t *ctx, ", CAST(SUM(debit) AS BIGINT) as debit" " FROM onchain_fees" " WHERE account_id = ?" - " GROUP BY txid, update_count" + " GROUP BY txid" " ORDER BY txid, update_count")); db_bind_u64(stmt, acct->db_id); diff --git a/tests/test_bookkeeper.py b/tests/test_bookkeeper.py index f37de5b2f366..504f59e2039e 100644 --- a/tests/test_bookkeeper.py +++ b/tests/test_bookkeeper.py @@ -472,8 +472,6 @@ def _check_events(node, channel_id, exp_events): _check_events(l2, channel_id, exp_events) -@pytest.mark.xfail -@pytest.mark.timeout(15) @unittest.skipIf(TEST_NETWORK != 'regtest', "network fees hardcoded") @pytest.mark.openchannel('v1') def test_bookkeeping_inspect_multifundchannel(node_factory, bitcoind): @@ -551,8 +549,6 @@ def test_bookkeeping_inspect_multifundchannel(node_factory, bitcoind): assert bkpr_total_fee_btc == getblock_fee_btc -@pytest.mark.xfail -@pytest.mark.timeout(15) @unittest.skipIf(TEST_NETWORK != 'regtest', "network fees hardcoded") @pytest.mark.openchannel('v2') def test_bookkeeping_inspect_mfc_dual_funded(node_factory, bitcoind):