Skip to content

Commit

Permalink
Fix add_tx_to_history duplicates check
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Sep 19, 2020
1 parent 451a6bc commit 9f3c5c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ def add_tx_to_history(self, txid):
with self.lock:
for addr in itertools.chain(list(self.txi.get(txid, {}).keys()), list(self.txo.get(txid, {}).keys())):
cur_hist = self._history.get(addr, list())
if not txid in itertools.chain(*cur_hist):
if not any(True for x in cur_hist if x[0] == txid):
cur_hist.append((txid, 0))
self._history[addr] = cur_hist

Expand Down

0 comments on commit 9f3c5c6

Please sign in to comment.