twallet: follow-up prev - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d293b2e0386765b6c2f6fbedb440a57dd17233bc DIR parent 37e7add7765dc4ec48dbb5fdeb05e79e9f97eac0 HTML Author: SomberNight <somber.night@protonmail.com> Date: Wed, 3 Jul 2019 13:40:42 +0200 wallet: follow-up prev Diffstat: M electrum/address_synchronizer.py | 3 ++- M electrum/wallet.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) --- DIR diff --git a/electrum/address_synchronizer.py b/electrum/address_synchronizer.py t@@ -39,6 +39,7 @@ from .logging import Logger if TYPE_CHECKING: from .network import Network + from .json_db import JsonDB TX_HEIGHT_LOCAL = -2 t@@ -59,7 +60,7 @@ class AddressSynchronizer(Logger): inherited by wallet """ - def __init__(self, db): + def __init__(self, db: JsonDB): self.db = db self.network = None # type: Network Logger.__init__(self) DIR diff --git a/electrum/wallet.py b/electrum/wallet.py t@@ -243,6 +243,10 @@ class Abstract_Wallet(AddressSynchronizer): super().set_up_to_date(b) if b: self.storage.write() + def clear_history(self): + super().clear_history() + self.storage.write() + def load_and_cleanup(self): self.load_keystore() self.test_addresses_sanity()