aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/environment.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-10 18:23:49 +0800
committerobscuren <geffobscura@gmail.com>2015-06-10 18:23:49 +0800
commit38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3 (patch)
tree3877af08004f9dc2de00001257c9fe678de049d1 /core/vm/environment.go
parentff5b3ef0877978699235d20b3caa9890b35ec6f8 (diff)
downloadgo-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar.gz
go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar.zst
go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.zip
core, core/vm: added structure logging
This also reduces the time required spend in the VM
Diffstat (limited to 'core/vm/environment.go')
-rw-r--r--core/vm/environment.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/vm/environment.go b/core/vm/environment.go
index 282d19578..31d5d5ea6 100644
--- a/core/vm/environment.go
+++ b/core/vm/environment.go
@@ -20,6 +20,8 @@ type Environment interface {
GasLimit() *big.Int
Transfer(from, to Account, amount *big.Int) error
AddLog(*state.Log)
+ AddStructLog(StructLog)
+ StructLogs() []StructLog
VmType() Type
@@ -31,6 +33,14 @@ type Environment interface {
Create(me ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, ContextRef)
}
+type StructLog struct {
+ Pc uint64
+ Op OpCode
+ Gas *big.Int
+ Memory []byte
+ Stack []*big.Int
+}
+
type Account interface {
SubBalance(amount *big.Int)
AddBalance(amount *big.Int)