From 673e07e0152f29e753eea49c4eae9c4723bb2bff Mon Sep 17 00:00:00 2001 From: Chris Li Date: Tue, 12 Nov 2024 10:40:30 +0800 Subject: [PATCH] fix: fix StateScheme overwrite bug (#220) --- eth/backend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index b329466fa..d96c20ce0 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -163,12 +163,12 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { if err != nil { return nil, err } - scheme, err := rawdb.ParseStateScheme(config.StateScheme, chainDb) + config.StateScheme, err = rawdb.ParseStateScheme(config.StateScheme, chainDb) if err != nil { return nil, err } // Try to recover offline state pruning only in hash-based. - if scheme == rawdb.HashScheme { + if config.StateScheme == rawdb.HashScheme { if err := pruner.RecoverPruning(stack.ResolvePath(""), chainDb); err != nil { log.Error("Failed to recover state", "error", err) }