From d293b2e0386765b6c2f6fbedb440a57dd17233bc Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 3 Jul 2019 13:40:42 +0200 Subject: [PATCH] wallet: follow-up prev --- electrum/address_synchronizer.py | 3 ++- electrum/wallet.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/electrum/address_synchronizer.py b/electrum/address_synchronizer.py index f21617911..40a8a5e58 100644 --- a/electrum/address_synchronizer.py +++ b/electrum/address_synchronizer.py @@ -39,6 +39,7 @@ from .logging import Logger if TYPE_CHECKING: from .network import Network + from .json_db import JsonDB TX_HEIGHT_LOCAL = -2 @@ -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) diff --git a/electrum/wallet.py b/electrum/wallet.py index 188f418a5..2ef89efc3 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -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()