From a2b5b3c1b7b4023accd289ddb1f2272276f082ef Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Tue, 22 Apr 2025 16:50:26 +0800 Subject: [PATCH] change blockCacheMemory to uint64 to avoid overflow on 32 bit platforms --- eth/downloader/queue.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 1dc8a74bc3..da619e764c 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -42,10 +42,10 @@ const ( ) var ( - blockCacheMaxItems = 32768 // Maximum number of blocks to cache before throttling the download - blockCacheInitialItems = 2048 // Initial number of blocks to start fetching, before we know the sizes of the blocks - blockCacheMemory = 2 * 1024 * 1024 * 1024 // Maximum amount of memory to use for block caching - blockCacheSizeWeight = 0.1 // Multiplier to approximate the average block size based on past ones + blockCacheMaxItems = 32768 // Maximum number of blocks to cache before throttling the download + blockCacheInitialItems = 2048 // Initial number of blocks to start fetching, before we know the sizes of the blocks + blockCacheSizeWeight = 0.1 // Multiplier to approximate the average block size based on past ones + blockCacheMemory uint64 = 2 * 1024 * 1024 * 1024 // Maximum amount of memory to use for block caching ) var (