From d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 5 Feb 2019 12:49:59 +0200 Subject: cmd/utils, eth: relinquish GC cache to read cache in archive mode --- ethdb/database.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ethdb') diff --git a/ethdb/database.go b/ethdb/database.go index 6c62d6a38..17f1478e5 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -25,6 +25,7 @@ import ( "sync" "time" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/syndtr/goleveldb/leveldb" @@ -70,7 +71,7 @@ func NewLDBDatabase(file string, cache int, handles int) (*LDBDatabase, error) { if handles < 16 { handles = 16 } - logger.Info("Allocated cache and file handles", "cache", cache, "handles", handles) + logger.Info("Allocated cache and file handles", "cache", common.StorageSize(cache*1024*1024), "handles", handles) // Open the db and recover any potential corruptions db, err := leveldb.OpenFile(file, &opt.Options{ -- cgit v1.2.3