commit acf473f7f2ba22a24349ddad712801d164d86d5b parent 64127a8beee4af6f73280e6ab918aa4d1fce6195 Author: ThomasV <thomasv@electrum.org> Date: Tue, 30 Jan 2018 01:08:04 +0100 Merge pull request #3777 from SomberNight/fix_wallet_check_history fix wallet.check_history Diffstat:
M | lib/wallet.py | | | 11 | ++++++++--- |
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/wallet.py b/lib/wallet.py @@ -281,10 +281,15 @@ class Abstract_Wallet(PrintError): @profiler def check_history(self): save = False - mine_addrs = list(filter(lambda k: self.is_mine(self.history[k]), self.history.keys())) - if len(mine_addrs) != len(self.history.keys()): + + hist_addrs_mine = list(filter(lambda k: self.is_mine(k), self.history.keys())) + hist_addrs_not_mine = list(filter(lambda k: not self.is_mine(k), self.history.keys())) + + for addr in hist_addrs_not_mine: + self.history.pop(addr) save = True - for addr in mine_addrs: + + for addr in hist_addrs_mine: hist = self.history[addr] for tx_hash, tx_height in hist: