core/vm/runtime: set random to enable merge-opcodes

This commit is contained in:
Martin Holst Swende 2024-05-17 12:22:42 +02:00
parent 473ee8fc07
commit f3922c467c
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -101,6 +101,10 @@ func setDefaults(cfg *Config) {
if cfg.BlobBaseFee == nil {
cfg.BlobBaseFee = big.NewInt(params.BlobTxMinBlobGasprice)
}
// Merge indicators
if t := cfg.ChainConfig.ShanghaiTime; cfg.ChainConfig.TerminalTotalDifficultyPassed || (t != nil && *t == 0) {
cfg.Random = &(common.Hash{})
}
}
// Execute executes the code using the input as call data during the execution.