From 8dca907891da3a3fa9e1a3a78d107c403d1a721b Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 26 Apr 2023 18:29:46 +0200 Subject: [PATCH] get_tx_parent: populate cache in chronological order --- electrum/wallet.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electrum/wallet.py b/electrum/wallet.py index b5919abc1..55018fc52 100644 --- a/electrum/wallet.py +++ b/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