From 028143ec7e0940422dba35c91084b392f4a61a53 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 21 Jun 2022 14:24:15 -0400 Subject: [PATCH] reduce tx_cache and merkle_cache sizes --- hub/db/db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hub/db/db.py b/hub/db/db.py index b2a8f59..112328b 100644 --- a/hub/db/db.py +++ b/hub/db/db.py @@ -90,9 +90,9 @@ class SecondaryDB: self.header_mc = MerkleCache(self.merkle, self.fs_block_hashes) # lru cache of tx_hash: (tx_bytes, tx_num, position, tx_height) - self.tx_cache = LRUCacheWithMetrics(2 ** 16, metric_name='tx', namespace=NAMESPACE) + self.tx_cache = LRUCacheWithMetrics(2 ** 15, metric_name='tx', namespace=NAMESPACE) # lru cache of block heights to merkle trees of the block tx hashes - self.merkle_cache = LRUCacheWithMetrics(2 ** 15, metric_name='merkle', namespace=NAMESPACE) + self.merkle_cache = LRUCacheWithMetrics(2 ** 14, metric_name='merkle', namespace=NAMESPACE) # these are only used if the cache_all_tx_hashes setting is on self.total_transactions: List[bytes] = []