Browse Source

db: Fix report and commit order for DB transactions

Reported-by: Simon Vrouwe <@SimonVrouwe>
Signed-off-by: Christian Decker <@cdecker>
travis-debug
Christian Decker 5 years ago
committed by neil saitug
parent
commit
894627a287
  1. 2
      wallet/db.c

2
wallet/db.c

@ -658,12 +658,12 @@ void db_commit_transaction(struct db *db)
bool ok;
assert(db->in_transaction);
db_assert_no_outstanding_statements(db);
db_report_changes(db, NULL, 0);
ok = db->config->commit_tx_fn(db);
if (!ok)
db_fatal("Failed to commit DB transaction: %s", db->error);
db_report_changes(db, NULL, 0);
db->in_transaction = NULL;
}

Loading…
Cancel
Save