fix(test): enable 3860 properly

This commit is contained in:
0xjvn 2026-03-09 17:13:49 +05:30
parent 0bcc0c52d8
commit 68bd04fa47

View file

@ -148,11 +148,15 @@ func TestCreateGas(t *testing.T) {
BlockNumber: big.NewInt(0), BlockNumber: big.NewInt(0),
} }
config := Config{} config := Config{}
chainConfig := params.AllEthashProtocolChanges
if tt.eip3860 { if tt.eip3860 {
config.ExtraEips = []int{3860} config.ExtraEips = []int{3860}
vmctx.Random = new(common.Hash)
chainConfig = params.MergedTestChainConfig
} }
evm := NewEVM(vmctx, statedb, params.AllEthashProtocolChanges, config) evm := NewEVM(vmctx, statedb, chainConfig, config)
var startGas = uint64(testGas) var startGas = uint64(testGas)
ret, gas, err := evm.Call(common.Address{}, address, nil, startGas, new(uint256.Int)) ret, gas, err := evm.Call(common.Address{}, address, nil, startGas, new(uint256.Int))
if err != nil { if err != nil {