Browse Source

get_tx_parent: populate cache in chronological order

master
ThomasV 3 years ago
parent
commit
8dca907891
  1. 6
      electrum/wallet.py

6
electrum/wallet.py

@ -893,7 +893,11 @@ class Abstract_Wallet(ABC, Logger, EventListener):
return {}
with self.lock, self.transaction_lock:
if self._last_full_history is None:
self._last_full_history = self.get_full_history(None)
self._last_full_history = self.get_full_history(None, include_lightning=False)
# populate cache in chronological order to avoid recursion limit
for _txid in self._last_full_history.keys():
self.get_tx_parents(_txid)
result = self._tx_parents_cache.get(txid, None)
if result is not None:
return result

Loading…
Cancel
Save