eth/tracers/internal/tracertest: add missing Random to call context (#30652)

Fixes a configuration issue in a test-helper, so that we can do call tracing-tests post-merge
release/1.14
Shude Li 1 month ago committed by Martin HS
parent 53e3f445ed
commit e9e1cb0784
  1. 5
      eth/tracers/internal/tracetest/util.go

@ -47,6 +47,11 @@ func (c *callContext) toBlockContext(genesis *core.Genesis) vm.BlockContext {
if genesis.Config.IsLondon(context.BlockNumber) {
context.BaseFee = (*big.Int)(c.BaseFee)
}
if genesis.Config.TerminalTotalDifficulty != nil && genesis.Config.TerminalTotalDifficulty.Sign() == 0 {
context.Random = &genesis.Mixhash
}
if genesis.ExcessBlobGas != nil && genesis.BlobGasUsed != nil {
excessBlobGas := eip4844.CalcExcessBlobGas(*genesis.ExcessBlobGas, *genesis.BlobGasUsed)
context.BlobBaseFee = eip4844.CalcBlobFee(excessBlobGas)

Loading…
Cancel
Save