mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 17:03:46 +00:00
Reverting more changes that were on firehose-fh3.0 but not on origin/master
This commit is contained in:
parent
0bf8a9dea9
commit
4105834d36
2 changed files with 4 additions and 9 deletions
|
|
@ -668,7 +668,6 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject)
|
||||||
delete(s.accountsOrigin, prev.address)
|
delete(s.accountsOrigin, prev.address)
|
||||||
delete(s.storagesOrigin, prev.address)
|
delete(s.storagesOrigin, prev.address)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.setStateObject(newobj)
|
s.setStateObject(newobj)
|
||||||
if prev != nil && !prev.deleted {
|
if prev != nil && !prev.deleted {
|
||||||
return newobj, prev
|
return newobj, prev
|
||||||
|
|
|
||||||
|
|
@ -169,18 +169,14 @@ type Config struct {
|
||||||
// Clique is allowed for now to live standalone, but ethash is forbidden and can
|
// Clique is allowed for now to live standalone, but ethash is forbidden and can
|
||||||
// only exist on already merged networks.
|
// only exist on already merged networks.
|
||||||
func CreateConsensusEngine(config *params.ChainConfig, db ethdb.Database) (consensus.Engine, error) {
|
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
|
// Geth v1.14.0 dropped support for non-merged networks in any consensus
|
||||||
// mode. If such a network is requested, reject startup.
|
// mode. If such a network is requested, reject startup.
|
||||||
if !config.TerminalTotalDifficultyPassed {
|
if !config.TerminalTotalDifficultyPassed {
|
||||||
return nil, errors.New("only PoS networks are supported, please transition old ones with Geth v1.13.x")
|
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
|
return beacon.New(ethash.NewFaker()), nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue