aboutsummaryrefslogtreecommitdiffstats
path: root/ethvm/closure.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-21 21:46:26 +0800
committerobscuren <geffobscura@gmail.com>2014-08-21 21:46:26 +0800
commit0af0f0d890120e007ce42f072e1ee179a62115d3 (patch)
tree5ae9ecafbb729d1636fadfcfa49fd9100959560c /ethvm/closure.go
parentd761af84c83ae8d9d723e6766abb7950ff59cdf3 (diff)
parentc173e9f4ab463cf3a44d35215bc29d846d6f6b02 (diff)
downloadgo-tangerine-0af0f0d890120e007ce42f072e1ee179a62115d3.tar
go-tangerine-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.gz
go-tangerine-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.bz2
go-tangerine-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.lz
go-tangerine-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.xz
go-tangerine-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.zst
go-tangerine-0af0f0d890120e007ce42f072e1ee179a62115d3.zip
Merge branch 'release/0.6.3'
Diffstat (limited to 'ethvm/closure.go')
-rw-r--r--ethvm/closure.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/ethvm/closure.go b/ethvm/closure.go
index 505fd43fb..54bfd05f4 100644
--- a/ethvm/closure.go
+++ b/ethvm/closure.go
@@ -3,9 +3,10 @@ package ethvm
// TODO Re write VM to use values instead of big integers?
import (
+ "math/big"
+
"github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil"
- "math/big"
)
type ClosureRef interface {
@@ -17,9 +18,10 @@ type ClosureRef interface {
// Basic inline closure object which implement the 'closure' interface
type Closure struct {
- caller ClosureRef
- object *ethstate.StateObject
- Code []byte
+ caller ClosureRef
+ object *ethstate.StateObject
+ Code []byte
+ message *ethstate.Message
Gas, UsedGas, Price *big.Int
@@ -27,8 +29,8 @@ type Closure struct {
}
// Create a new closure for the given data items
-func NewClosure(caller ClosureRef, object *ethstate.StateObject, code []byte, gas, price *big.Int) *Closure {
- c := &Closure{caller: caller, object: object, Code: code, Args: nil}
+func NewClosure(msg *ethstate.Message, caller ClosureRef, object *ethstate.StateObject, code []byte, gas, price *big.Int) *Closure {
+ c := &Closure{message: msg, caller: caller, object: object, Code: code, Args: nil}
// Gas should be a pointer so it can safely be reduced through the run
// This pointer will be off the state transition