From 4105834d36c39e7cf33a24c134439d29491ff539 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Mon, 25 Mar 2024 14:51:24 -0400 Subject: [PATCH] Reverting more changes that were on `firehose-fh3.0` but not on `origin/master` --- core/state/statedb.go | 1 - eth/ethconfig/config.go | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/core/state/statedb.go b/core/state/statedb.go index bbaa7791ea..205324e2db 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -668,7 +668,6 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) delete(s.accountsOrigin, prev.address) delete(s.storagesOrigin, prev.address) } - s.setStateObject(newobj) if prev != nil && !prev.deleted { return newobj, prev diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index c9179e9462..fef7f29f4e 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -169,18 +169,14 @@ type Config struct { // Clique is allowed for now to live standalone, but ethash is forbidden and can // only exist on already merged networks. func CreateConsensusEngine(config *params.ChainConfig, db ethdb.Database) (consensus.Engine, error) { - // Wrap previously supported consensus engines into their post-merge counterpart - if config.Clique != nil { - // Enforce? - config.TerminalTotalDifficultyPassed = true - return beacon.New(clique.New(config.Clique, db)), nil - } - // Geth v1.14.0 dropped support for non-merged networks in any consensus // mode. If such a network is requested, reject startup. if !config.TerminalTotalDifficultyPassed { return nil, errors.New("only PoS networks are supported, please transition old ones with Geth v1.13.x") } - + // Wrap previously supported consensus engines into their post-merge counterpart + if config.Clique != nil { + return beacon.New(clique.New(config.Clique, db)), nil + } return beacon.New(ethash.NewFaker()), nil }