reduce tx_cache and merkle_cache sizes
This commit is contained in:
parent
ea7b55f1f0
commit
028143ec7e
1 changed files with 2 additions and 2 deletions
|
@ -90,9 +90,9 @@ class SecondaryDB:
|
||||||
self.header_mc = MerkleCache(self.merkle, self.fs_block_hashes)
|
self.header_mc = MerkleCache(self.merkle, self.fs_block_hashes)
|
||||||
|
|
||||||
# lru cache of tx_hash: (tx_bytes, tx_num, position, tx_height)
|
# 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
|
# 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
|
# these are only used if the cache_all_tx_hashes setting is on
|
||||||
self.total_transactions: List[bytes] = []
|
self.total_transactions: List[bytes] = []
|
||||||
|
|
Loading…
Reference in a new issue