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) }