mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
bkpr-recorder: fatal if there's an error with a database statement
We were silently failing when NULLS FIRST wasn't found on older boxes (running sqlite3 < v3.30.1)
This commit is contained in:
parent
fdfca9e721
commit
1a25651182
2 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,8 @@ static struct chain_event **find_chain_events(const tal_t *ctx,
|
|||
struct chain_event **results;
|
||||
|
||||
db_query_prepared(stmt);
|
||||
if (stmt->error)
|
||||
db_fatal("find_chain_events err: %s", stmt->error);
|
||||
results = tal_arr(ctx, struct chain_event *, 0);
|
||||
while (db_step(stmt)) {
|
||||
struct chain_event *e = stmt2chain_event(results, stmt);
|
||||
|
|
|
@ -697,6 +697,7 @@ static bool test_onchain_fee_chan_close(const tal_t *ctx, struct plugin *p)
|
|||
CHECK(acct->onchain_resolved_block == 0);
|
||||
db_begin_transaction(db);
|
||||
maybe_mark_account_onchain(db, acct);
|
||||
CHECK_MSG(!db_err, db_err);
|
||||
CHECK(acct->onchain_resolved_block == blockheight + 2);
|
||||
err = update_channel_onchain_fees(ctx, db, acct);
|
||||
CHECK_MSG(!err, err);
|
||||
|
|
Loading…
Add table
Reference in a new issue