From cfe87b16c33eff340ea80d8b7e1b027daf6fd3b3 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 2 Aug 2017 13:02:01 +0200 Subject: [PATCH] db: Do not exit transaction on failure Automatically exiting the DB transaction upon any failure is strange since it'll kill any later attempt to commit. The commit itself should be used to verify that everything was ok. --- wallet/db.c | 1 - 1 file changed, 1 deletion(-) diff --git a/wallet/db.c b/wallet/db.c index 3c7014872..9e5540407 100644 --- a/wallet/db.c +++ b/wallet/db.c @@ -99,7 +99,6 @@ bool PRINTF_FMT(3, 4) err = sqlite3_exec(db->sql, cmd, NULL, NULL, &errmsg); if (err != SQLITE_OK) { - db->in_transaction = false; tal_free(db->err); db->err = tal_fmt(db, "%s:%s:%s:%s", caller, sqlite3_errstr(err), cmd, errmsg);