Skip to content

Commit

Permalink
rm extra galloc capturing
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyaniarun1993 committed Dec 11, 2023
1 parent 97c69bc commit 9f876d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/genesis_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ func GenesisToBlock(g *types.Genesis, tmpDir string, bcLogger BlockchainLogger)

r, w := state.NewDbStateReader(tx), state.NewDbStateWriter(tx, 0)
statedb = state.New(r)
statedb.SetLogger(bcLogger)

hasConstructorAllocation := false
for _, account := range g.Alloc {
Expand All @@ -578,6 +577,8 @@ func GenesisToBlock(g *types.Genesis, tmpDir string, bcLogger BlockchainLogger)
if overflow {
panic("overflow at genesis allocs")
}
// This is not actually logged via tracer because OnGenesisBlock
// already captures the allocations.
statedb.AddBalance(addr, balance, evmtypes.BalanceChangeGenesisBalance)
statedb.SetCode(addr, account.Code)
statedb.SetNonce(addr, account.Nonce)
Expand Down

0 comments on commit 9f876d2

Please sign in to comment.