From 0b8c67f2f05c425a2f71b0eb7bba1ebd5cb94d24 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 16 Oct 2018 21:56:50 -0400 Subject: [PATCH] move db.commit() --- torba/basedatabase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torba/basedatabase.py b/torba/basedatabase.py index a96b11be3..63bedf7b3 100644 --- a/torba/basedatabase.py +++ b/torba/basedatabase.py @@ -273,6 +273,7 @@ class BaseDatabase(SQLiteMixin): })) await self._set_address_history(address, history) + await self.db.commit() async def reserve_outputs(self, txos, is_reserved=True): txoids = [txo.id for txo in txos] @@ -460,7 +461,7 @@ class BaseDatabase(SQLiteMixin): "UPDATE pubkey_address SET history = ?, used_times = ? WHERE address = ?", (history, history.count(':')//2, address) ) - await self.db.commit() async def set_address_history(self, address, history): await self._set_address_history(address, history) + await self.db.commit()