mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
remove bench
This commit is contained in:
parent
301d5a8b27
commit
3fc9d0ea0e
1 changed files with 0 additions and 18 deletions
|
|
@ -26,7 +26,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/holiman/uint256"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var loopInterruptTests = []string{
|
||||
|
|
@ -75,20 +74,3 @@ func TestLoopInterrupt(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkLoop(b *testing.B) {
|
||||
address := common.BytesToAddress([]byte("contract"))
|
||||
vmctx := BlockContext{
|
||||
Transfer: func(StateDB, common.Address, common.Address, *uint256.Int) {},
|
||||
}
|
||||
|
||||
statedb, _ := state.New(types.EmptyRootHash, state.NewDatabaseForTesting())
|
||||
statedb.CreateAccount(address)
|
||||
statedb.SetCode(address, common.Hex2Bytes(loopInterruptTests[0]))
|
||||
statedb.Finalise(true)
|
||||
|
||||
evm := NewEVM(vmctx, statedb, params.AllEthashProtocolChanges, Config{})
|
||||
b.ResetTimer()
|
||||
_, _, err := evm.Call(common.Address{}, address, nil, uint64(b.N*100), new(uint256.Int))
|
||||
require.EqualError(b, err, ErrOutOfGas.Error())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue