From 8d24b5beefce9f6965c47208d619d8c29e0ea411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:34:56 +0800 Subject: [PATCH] fix wrong root hash for generating snapshot --- core/blockchain_impl.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/blockchain_impl.go b/core/blockchain_impl.go index acf050e91..b14bcbe28 100644 --- a/core/blockchain_impl.go +++ b/core/blockchain_impl.go @@ -354,7 +354,8 @@ func newBlockChainWithOptions( NoBuild: bc.cacheConfig.SnapshotNoBuild, AsyncBuild: !bc.cacheConfig.SnapshotWait, } - bc.snaps, _ = snapshot.New(snapconfig, bc.db, bc.triedb, head.Hash()) + fmt.Println("loading/generating snapshot...") + bc.snaps, _ = snapshot.New(snapconfig, bc.db, bc.triedb, head.Root()) } curHeader := bc.CurrentBlock().Header()