Skip to content

Commit

Permalink
unwind read genesis (node-real#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
blxdyx authored Dec 20, 2023
1 parent 743d023 commit 3533e04
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions core/genesis_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
"github.com/ledgerwatch/erigon/consensus/serenity"
"github.com/ledgerwatch/erigon/core/rawdb"
"github.com/ledgerwatch/erigon/core/state"
"github.com/ledgerwatch/erigon/core/systemcontracts"
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/crypto"
"github.com/ledgerwatch/erigon/eth/ethconfig"
Expand Down Expand Up @@ -98,7 +97,6 @@ func WriteGenesisBlock(tx kv.RwTx, genesis *types.Genesis, overrideShanghaiTime
config.ShanghaiTime = overrideShanghaiTime
}
}
systemcontracts.GenesisHash = storedHash
if (storedHash == libcommon.Hash{}) {
custom := true
if genesis == nil {
Expand Down
1 change: 1 addition & 0 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
genesisSpec := config.Genesis
if h != (libcommon.Hash{}) { // fallback to db content
chainConfig = genesisSpec.Config
systemcontracts.GenesisHash = h
genesis = rawdb.ReadBlock(tx, h, 0)
} else {
var genesisErr error
Expand Down

0 comments on commit 3533e04

Please sign in to comment.