From 4b54c4b57fabaf1fb1bc11a0bfd65dd7c5fb9aa0 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Thu, 10 Aug 2023 18:26:03 +0200 Subject: [PATCH] deactivate snapshot for tests --- core/state/snapshot/snapshot.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/core/state/snapshot/snapshot.go b/core/state/snapshot/snapshot.go index ed01170941..7880a87997 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -23,7 +23,6 @@ import ( "fmt" "sync" - "github.com/VictoriaMetrics/fastcache" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" @@ -216,15 +215,17 @@ func New(config Config, diskdb ethdb.KeyValueStore, triedb *trie.Database, root log.Warn("Failed to load snapshot", "err", err) if !config.NoBuild { if config.Verkle { - snap.layers = map[common.Hash]snapshot{ - root: &diskLayer{ - diskdb: diskdb, - triedb: triedb, - root: root, - cache: fastcache.New(config.CacheSize * 1024 * 1024), - }, - } - return snap, nil + // TODO update the Rebuild function + // snap.layers = map[common.Hash]snapshot{ + // root: &diskLayer{ + // diskdb: diskdb, + // triedb: triedb, + // root: root, + // cache: fastcache.New(config.CacheSize * 1024 * 1024), + // }, + // } + // return snap, nil + return nil, nil } log.Warn("Failed to load snapshot, regenerating", "err", err) snap.Rebuild(root)