commit d293b2e0386765b6c2f6fbedb440a57dd17233bc
parent 37e7add7765dc4ec48dbb5fdeb05e79e9f97eac0
Author: SomberNight <somber.night@protonmail.com>
Date: Wed, 3 Jul 2019 13:40:42 +0200
wallet: follow-up prev
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git 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
@@ -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()