increase default tx_cache_size setting

This commit is contained in:
Jack Robison 2020-11-30 14:52:15 -05:00
parent 5cd2ebc960
commit 2717bf7d49
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -156,7 +156,7 @@ class Ledger(metaclass=LedgerRegistry):
self._on_ready_controller = StreamController()
self.on_ready = self._on_ready_controller.stream
self._tx_cache = pylru.lrucache(self.config.get("tx_cache_size", 100_000))
self._tx_cache = pylru.lrucache(self.config.get("tx_cache_size", 10_000_000))
self._update_tasks = TaskGroup()
self._other_tasks = TaskGroup() # that we dont need to start
self._utxo_reservation_lock = asyncio.Lock()
@ -578,7 +578,7 @@ class Ledger(metaclass=LedgerRegistry):
log.warning("history mismatch: %s vs %s", remote_history[remote_i], pending_synced_history[i])
synced_history += pending_synced_history[i]
cache_size = self.config.get("tx_cache_size", 100_000)
cache_size = self.config.get("tx_cache_size", 10_000_000)
for txid, cache_item in updated_cached_items.items():
cache_item.pending_verifications -= 1
if cache_item.pending_verifications < 0: