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
pull/30666/head
Shude Li 4 weeks ago committed by GitHub
parent 478012ab23
commit f8f5609b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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) { if genesis.Config.IsLondon(context.BlockNumber) {
context.BaseFee = (*big.Int)(c.BaseFee) 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 { if genesis.ExcessBlobGas != nil && genesis.BlobGasUsed != nil {
excessBlobGas := eip4844.CalcExcessBlobGas(*genesis.ExcessBlobGas, *genesis.BlobGasUsed) excessBlobGas := eip4844.CalcExcessBlobGas(*genesis.ExcessBlobGas, *genesis.BlobGasUsed)
context.BlobBaseFee = eip4844.CalcBlobFee(excessBlobGas) context.BlobBaseFee = eip4844.CalcBlobFee(excessBlobGas)

Loading…
Cancel
Save