mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-03 22:34:21 +01:00
db: we must always be in a transaction, remove nested, call fatal()
We save location where transaction was started, in case we try to nest. There's now no error case; db_exec_mayfail() is the only one. This means the tests need to override fatal() if they want to intercept these errors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
f4d27eefa1
commit
4fb472b7a7
@@ -287,8 +287,8 @@ static void json_delinvoice(struct command *cmd,
|
||||
}
|
||||
|
||||
if (!wallet_invoice_remove(cmd->ld->wallet, i)) {
|
||||
log_broken(cmd->ld->log, "Error attempting to remove invoice %"PRIu64": %s",
|
||||
i->id, cmd->ld->wallet->db->err);
|
||||
log_broken(cmd->ld->log, "Error attempting to remove invoice %"PRIu64,
|
||||
i->id);
|
||||
command_fail(cmd, "Database error");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user