From 15674d5a454d926db5c2c7f6a984df910dafeaa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Tue, 2 May 2023 07:47:02 +0800 Subject: [PATCH] integrate snapshot feature with statedb and add cache to states --- core/blockchain_impl.go | 1 - core/state/snapshot/snapshot.go | 1 - 2 files changed, 2 deletions(-) diff --git a/core/blockchain_impl.go b/core/blockchain_impl.go index d71371986..73878387e 100644 --- a/core/blockchain_impl.go +++ b/core/blockchain_impl.go @@ -262,7 +262,6 @@ func newBlockChainWithOptions( if stateCache == nil { stateCache = state.NewDatabaseWithNodeDB(db, triedb) } - bodyCache, _ := lru.New(bodyCacheLimit) bodyRLPCache, _ := lru.New(bodyCacheLimit) receiptsCache, _ := lru.New(receiptsCacheLimit) diff --git a/core/state/snapshot/snapshot.go b/core/state/snapshot/snapshot.go index d294ff185..210fcac62 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -206,7 +206,6 @@ func New(config Config, diskdb ethdb.KeyValueStore, triedb *trie.Database, root utils.Logger().Warn().Err(err).Msg("Snapshot maintenance disabled (syncing)") return snap, nil } - // Create the building waiter if the background generation is allowed if !config.NoBuild && !config.AsyncBuild { defer snap.waitBuild()