fix wrong root hash for generating snapshot

pull/4618/head
“GheisMohammadi” 10 months ago
parent 2441a0b544
commit 8d24b5beef
No known key found for this signature in database
GPG Key ID: 15073AED3829FE90
  1. 3
      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()

Loading…
Cancel
Save