fix wallet.check_history

This commit is contained in:
SomberNight 2018-01-27 04:24:15 +01:00
parent 7ab9fa5be4
commit d09138446f

View file

@ -272,10 +272,15 @@ class Abstract_Wallet(PrintError):
@profiler @profiler
def check_history(self): def check_history(self):
save = False 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 save = True
for addr in mine_addrs:
for addr in hist_addrs_mine:
hist = self.history[addr] hist = self.history[addr]
for tx_hash, tx_height in hist: for tx_hash, tx_height in hist: