aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/logger.go
diff options
context:
space:
mode:
authorYohann Leon <sybiload@gmail.com>2017-03-22 22:32:51 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-03-22 22:32:51 +0800
commit6742fc526f3e1ae985d82a1781df4267485e2c70 (patch)
tree83da1e8ce5c2ae673358fc244b9cba8862f806be /core/vm/logger.go
parent9b84caf3a5f55cc2a14b50291118b9fab668b8c2 (diff)
downloadgo-tangerine-6742fc526f3e1ae985d82a1781df4267485e2c70.tar.gz
go-tangerine-6742fc526f3e1ae985d82a1781df4267485e2c70.tar.zst
go-tangerine-6742fc526f3e1ae985d82a1781df4267485e2c70.zip
core/vm: use uint64 instead of *big.Int in tracer (#3805)
Diffstat (limited to 'core/vm/logger.go')
-rw-r--r--core/vm/logger.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/vm/logger.go b/core/vm/logger.go
index 3d7e1c95f..825025b05 100644
--- a/core/vm/logger.go
+++ b/core/vm/logger.go
@@ -52,8 +52,8 @@ type LogConfig struct {
type StructLog struct {
Pc uint64
Op OpCode
- Gas *big.Int
- GasCost *big.Int
+ Gas uint64
+ GasCost uint64
Memory []byte
Stack []*big.Int
Storage map[common.Hash]common.Hash
@@ -67,7 +67,7 @@ type StructLog struct {
// Note that reference types are actual VM data structures; make copies
// if you need to retain them beyond the current call.
type Tracer interface {
- CaptureState(env *EVM, pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, stack *Stack, contract *Contract, depth int, err error) error
+ CaptureState(env *EVM, pc uint64, op OpCode, gas, cost uint64, memory *Memory, stack *Stack, contract *Contract, depth int, err error) error
}
// StructLogger is an EVM state logger and implements Tracer.
@@ -96,7 +96,7 @@ func NewStructLogger(cfg *LogConfig) *StructLogger {
// captureState logs a new structured log message and pushes it out to the environment
//
// captureState also tracks SSTORE ops to track dirty values.
-func (l *StructLogger) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, stack *Stack, contract *Contract, depth int, err error) error {
+func (l *StructLogger) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost uint64, memory *Memory, stack *Stack, contract *Contract, depth int, err error) error {
// check if already accumulated the specified number of logs
if l.cfg.Limit != 0 && l.cfg.Limit <= len(l.logs) {
return ErrTraceLimitReached
@@ -158,7 +158,7 @@ func (l *StructLogger) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost *b
}
}
// create a new snaptshot of the EVM.
- log := StructLog{pc, op, new(big.Int).Set(gas), cost, mem, stck, storage, env.depth, err}
+ log := StructLog{pc, op, gas, cost, mem, stck, storage, env.depth, err}
l.logs = append(l.logs, log)
return nil