Skip to content

Commit 8c5c196

Browse files
islishudezfy0701
authored andcommitted
eth/tracers/internal/tracertest: add missing Random to call context (ethereum#30652)
Fixes a configuration issue in a test-helper, so that we can do call tracing-tests post-merge
1 parent 4679fa8 commit 8c5c196

File tree

1 file changed

+5
-0
lines changed
  • eth/tracers/internal/tracetest

1 file changed

+5
-0
lines changed

eth/tracers/internal/tracetest/util.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ func (c *callContext) toBlockContext(genesis *core.Genesis) vm.BlockContext {
4747
if genesis.Config.IsLondon(context.BlockNumber) {
4848
context.BaseFee = (*big.Int)(c.BaseFee)
4949
}
50+
51+
if genesis.Config.TerminalTotalDifficulty != nil && genesis.Config.TerminalTotalDifficulty.Sign() == 0 {
52+
context.Random = &genesis.Mixhash
53+
}
54+
5055
if genesis.ExcessBlobGas != nil && genesis.BlobGasUsed != nil {
5156
excessBlobGas := eip4844.CalcExcessBlobGas(*genesis.ExcessBlobGas, *genesis.BlobGasUsed)
5257
context.BlobBaseFee = eip4844.CalcBlobFee(excessBlobGas)

0 commit comments

Comments
 (0)