Skip to content

Commit

Permalink
Check for duplicates in add_tx_to_history
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Sep 19, 2020
1 parent a5d015d commit 451a6bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1442,8 +1442,9 @@ 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())
cur_hist.append((txid, 0))
self._history[addr] = cur_hist
if not txid in itertools.chain(*cur_hist):
cur_hist.append((txid, 0))
self._history[addr] = cur_hist

def get_history(self, domain=None, *, reverse=False):
# get domain
Expand Down

0 comments on commit 451a6bc

Please sign in to comment.