Skip to content

Commit

Permalink
If BaseFee is nil, replay-fork set BaseFee as zero
Browse files Browse the repository at this point in the history
  • Loading branch information
alkorang committed Jan 18, 2022
1 parent bf444f1 commit 97d304e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/substate-cli/replay/replay_fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ func replayForkTask(block uint64, tx int, substate *research.Substate, taskPool
}

chainConfig := ReplayForkChainConfig
if chainConfig.IsLondon(blockCtx.BlockNumber) && blockCtx.BaseFee == nil {
// If blockCtx.BaseFee is nil, assume blockCtx.BaseFee is zero
blockCtx.BaseFee = new(big.Int)
}
evm := vm.NewEVM(blockCtx, txCtx, statedb, chainConfig, vmConfig)
snapshot := statedb.Snapshot()
msgResult, err := core.ApplyMessage(evm, msg, gaspool)
Expand Down

0 comments on commit 97d304e

Please sign in to comment.