Browse Source
Merge pull request #3777 from SomberNight/fix_wallet_check_history
fix wallet.check_history
3.1
ThomasV
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
3 deletions
-
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: |
|
|
|