Skip to content

Commit

Permalink
core/genesis.go: use head directly instead of block
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jan 21, 2025
1 parent 19f0c6b commit 1156f43
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ func (g *Genesis) toBlock(db ethdb.Database, triedb *triedb.Database) *types.Blo
}

// Configure any stateful precompiles that should be enabled in the genesis.
block := types.NewBlockWithHeader(head)
err = ApplyPrecompileActivations(g.Config, nil, block.Number(), block.Time(), statedb)
err = ApplyPrecompileActivations(g.Config, nil, head.Number, head.Time, statedb)
if err != nil {
panic(fmt.Sprintf("unable to configure precompiles in genesis block: %v", err))
}
Expand Down

0 comments on commit 1156f43

Please sign in to comment.