Skip to content

Commit

Permalink
Remove grouping by update_count in finding onchain fees
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
evansmj committed Dec 14, 2023
1 parent 3d843ed commit 57ebe9d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/bkpr/recorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions tests/test_bookkeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 57ebe9d

Please sign in to comment.