Not rewind chain on hard forks (#1798)

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
This commit is contained in:
ledgerwatch 2021-04-25 07:14:10 +01:00 committed by GitHub
parent d959986466
commit 88e8828bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,16 +317,6 @@ func New(stack *node.Node, config *ethconfig.Config, gitCommit string) (*Ethereu
vmConfig, _ := BlockchainRuntimeConfig(config)
txCacher := core.NewTxSenderCacher(runtime.NumCPU())
// Rewind the chain in case of an incompatible config upgrade.
if compat, ok := genesisErr.(*params.ConfigCompatError); ok {
log.Warn("Rewinding chain to upgrade configuration", "err", compat)
core.SetHead(chainDb, compat.RewindTo)
err = rawdb.WriteChainConfig(chainDb, genesisHash, chainConfig)
if err != nil {
return nil, err
}
}
if config.TxPool.Journal != "" {
config.TxPool.Journal, err = stack.ResolvePath(config.TxPool.Journal)
if err != nil {