Skip to content

Commit c2dd6ce

Browse files
committed
chain_bridge: increase block height cache
To make sure we don't cycle through the LRU entries each time we fetch all stats, we increase the size of the cache.
1 parent eff99b8 commit c2dd6ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chain_bridge.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import (
2727

2828
const (
2929
// maxNumBlocksInCache is the maximum number of blocks we'll cache
30-
// timestamps for. With 100k blocks we should only take up approximately
31-
// 800kB of memory (4 bytes for the block height and 4 bytes for the
30+
// timestamps for. With 400k blocks we should only take up approximately
31+
// 3200kB of memory (4 bytes for the block height and 4 bytes for the
3232
// timestamp, not including any map/cache overhead).
33-
maxNumBlocksInCache = 100_000
33+
maxNumBlocksInCache = 400_000
3434
)
3535

3636
// cacheableTimestamp is a wrapper around an uint32 that can be used as a value

0 commit comments

Comments
 (0)