get_tx_parent: populate cache in chronological order
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user