diff options
author | Yohann Leon <sybiload@gmail.com> | 2017-03-22 22:32:51 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-03-22 22:32:51 +0800 |
commit | 6742fc526f3e1ae985d82a1781df4267485e2c70 (patch) | |
tree | 83da1e8ce5c2ae673358fc244b9cba8862f806be /core/vm/interpreter.go | |
parent | 9b84caf3a5f55cc2a14b50291118b9fab668b8c2 (diff) | |
download | dexon-6742fc526f3e1ae985d82a1781df4267485e2c70.tar.gz dexon-6742fc526f3e1ae985d82a1781df4267485e2c70.tar.zst dexon-6742fc526f3e1ae985d82a1781df4267485e2c70.zip |
core/vm: use uint64 instead of *big.Int in tracer (#3805)
Diffstat (limited to 'core/vm/interpreter.go')
-rw-r--r-- | core/vm/interpreter.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index 7d12ebc05..8ee9d3ca7 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -18,7 +18,6 @@ package vm import ( "fmt" - "math/big" "sync/atomic" "time" @@ -117,9 +116,7 @@ func (evm *Interpreter) Run(contract *Contract, input []byte) (ret []byte, err e if err != nil && evm.cfg.Debug { // XXX For debugging //fmt.Printf("%04d: %8v cost = %-8d stack = %-8d ERR = %v\n", pc, op, cost, stack.len(), err) - // TODO update the tracer - g, c := new(big.Int).SetUint64(contract.Gas), new(big.Int).SetUint64(cost) - evm.cfg.Tracer.CaptureState(evm.env, pc, op, g, c, mem, stack, contract, evm.env.depth, err) + evm.cfg.Tracer.CaptureState(evm.env, pc, op, contract.Gas, cost, mem, stack, contract, evm.env.depth, err) } }() @@ -177,8 +174,7 @@ func (evm *Interpreter) Run(contract *Contract, input []byte) (ret []byte, err e } if evm.cfg.Debug { - g, c := new(big.Int).SetUint64(contract.Gas), new(big.Int).SetUint64(cost) - evm.cfg.Tracer.CaptureState(evm.env, pc, op, g, c, mem, stack, contract, evm.env.depth, err) + evm.cfg.Tracer.CaptureState(evm.env, pc, op, contract.Gas, cost, mem, stack, contract, evm.env.depth, err) } // XXX For debugging //fmt.Printf("%04d: %8v cost = %-8d stack = %-8d\n", pc, op, cost, stack.len()) |