|
|
@ -57,6 +57,10 @@ type Config struct { |
|
|
|
// sets defaults on the config
|
|
|
|
// sets defaults on the config
|
|
|
|
func setDefaults(cfg *Config) { |
|
|
|
func setDefaults(cfg *Config) { |
|
|
|
if cfg.ChainConfig == nil { |
|
|
|
if cfg.ChainConfig == nil { |
|
|
|
|
|
|
|
var ( |
|
|
|
|
|
|
|
shanghaiTime = uint64(0) |
|
|
|
|
|
|
|
cancunTime = uint64(0) |
|
|
|
|
|
|
|
) |
|
|
|
cfg.ChainConfig = ¶ms.ChainConfig{ |
|
|
|
cfg.ChainConfig = ¶ms.ChainConfig{ |
|
|
|
ChainID: big.NewInt(1), |
|
|
|
ChainID: big.NewInt(1), |
|
|
|
HomesteadBlock: new(big.Int), |
|
|
|
HomesteadBlock: new(big.Int), |
|
|
@ -72,9 +76,14 @@ func setDefaults(cfg *Config) { |
|
|
|
MuirGlacierBlock: new(big.Int), |
|
|
|
MuirGlacierBlock: new(big.Int), |
|
|
|
BerlinBlock: new(big.Int), |
|
|
|
BerlinBlock: new(big.Int), |
|
|
|
LondonBlock: new(big.Int), |
|
|
|
LondonBlock: new(big.Int), |
|
|
|
|
|
|
|
ArrowGlacierBlock: nil, |
|
|
|
|
|
|
|
GrayGlacierBlock: nil, |
|
|
|
|
|
|
|
TerminalTotalDifficulty: big.NewInt(0), |
|
|
|
|
|
|
|
TerminalTotalDifficultyPassed: true, |
|
|
|
|
|
|
|
MergeNetsplitBlock: nil, |
|
|
|
|
|
|
|
ShanghaiTime: &shanghaiTime, |
|
|
|
|
|
|
|
CancunTime: &cancunTime} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if cfg.Difficulty == nil { |
|
|
|
if cfg.Difficulty == nil { |
|
|
|
cfg.Difficulty = new(big.Int) |
|
|
|
cfg.Difficulty = new(big.Int) |
|
|
|
} |
|
|
|
} |
|
|
@ -101,6 +110,10 @@ func setDefaults(cfg *Config) { |
|
|
|
if cfg.BlobBaseFee == nil { |
|
|
|
if cfg.BlobBaseFee == nil { |
|
|
|
cfg.BlobBaseFee = big.NewInt(params.BlobTxMinBlobGasprice) |
|
|
|
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.
|
|
|
|
// Execute executes the code using the input as call data during the execution.
|
|
|
|