postgres: add missing 'update_count' to stmt

Reported-By: @rustyrussell
Changelog-Fixed: Plugins: `bookkeeper` onchain fees calculation was incorrect with PostgresQL.
This commit is contained in:
niftynei
2023-04-05 12:29:53 +09:30
committed by Rusty Russell
parent 13ae1a5168
commit d2176e3385

View File

@@ -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"
" GROUP BY txid, update_count"
" ORDER BY txid, update_count"));
db_bind_u64(stmt, 0, acct->db_id);