diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-02-04 06:46:27 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-03-24 06:02:42 +0800 |
commit | 14013372aeca2d7f1d8c3a87b7df7c27868314be (patch) | |
tree | d4951dbe1d7f1b25b4bbde786b14b5b0b6107bcc /core/vm/jit_test.go | |
parent | 342ae7ce7dfd7a0eab2dd06bfa65199825279f05 (diff) | |
download | dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar.gz dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar.zst dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.zip |
core: Added EVM configuration options
The EVM is now initialised with an additional configured object that
allows you to turn on debugging options.
Diffstat (limited to 'core/vm/jit_test.go')
-rw-r--r-- | core/vm/jit_test.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/core/vm/jit_test.go b/core/vm/jit_test.go index 5fac0156f..43b1dee2a 100644 --- a/core/vm/jit_test.go +++ b/core/vm/jit_test.go @@ -125,17 +125,17 @@ type vmBench struct { type account struct{} -func (account) SubBalance(amount *big.Int) {} -func (account) AddBalance(amount *big.Int) {} -func (account) SetAddress(common.Address) {} -func (account) Value() *big.Int { return nil } -func (account) SetBalance(*big.Int) {} -func (account) SetNonce(uint64) {} -func (account) Balance() *big.Int { return nil } -func (account) Address() common.Address { return common.Address{} } -func (account) ReturnGas(*big.Int, *big.Int) {} -func (account) SetCode([]byte) {} -func (account) EachStorage(cb func(key, value []byte)) {} +func (account) SubBalance(amount *big.Int) {} +func (account) AddBalance(amount *big.Int) {} +func (account) SetAddress(common.Address) {} +func (account) Value() *big.Int { return nil } +func (account) SetBalance(*big.Int) {} +func (account) SetNonce(uint64) {} +func (account) Balance() *big.Int { return nil } +func (account) Address() common.Address { return common.Address{} } +func (account) ReturnGas(*big.Int, *big.Int) {} +func (account) SetCode([]byte) {} +func (account) ForEachStorage(cb func(key, value common.Hash) bool) {} func runVmBench(test vmBench, b *testing.B) { var sender account @@ -165,16 +165,16 @@ func runVmBench(test vmBench, b *testing.B) { type Env struct { gasLimit *big.Int depth int - evm *Vm + evm *EVM } func NewEnv() *Env { env := &Env{gasLimit: big.NewInt(10000), depth: 0} - env.evm = EVM(env) + env.evm = New(env, nil) return env } -func (self *Env) Vm() *Vm { return self.evm } +func (self *Env) Vm() Vm { return self.evm } func (self *Env) Origin() common.Address { return common.Address{} } func (self *Env) BlockNumber() *big.Int { return big.NewInt(0) } func (self *Env) AddStructLog(log StructLog) { |