diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-30 20:43:32 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-30 20:43:32 +0800 |
commit | 21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8 (patch) | |
tree | 6d19b52ecde07314bc6f3a156df47c81d94c9b35 /ethchain/closure.go | |
parent | 38d6b67b5cfbfb63620a244ea01b5b534917128f (diff) | |
download | go-tangerine-21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8.tar go-tangerine-21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8.tar.gz go-tangerine-21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8.tar.bz2 go-tangerine-21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8.tar.lz go-tangerine-21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8.tar.xz go-tangerine-21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8.tar.zst go-tangerine-21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8.zip |
Added manifest changes and changed closures
Diffstat (limited to 'ethchain/closure.go')
-rw-r--r-- | ethchain/closure.go | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/ethchain/closure.go b/ethchain/closure.go index 57abaa91e..7e911ad99 100644 --- a/ethchain/closure.go +++ b/ethchain/closure.go @@ -7,13 +7,6 @@ import ( "math/big" ) -type Callee interface { -} - -type Reference interface { - Callee -} - type ClosureRef interface { ReturnGas(*big.Int, *big.Int, *State) Address() []byte @@ -24,8 +17,8 @@ type ClosureRef interface { // Basic inline closure object which implement the 'closure' interface type Closure struct { - callee ClosureRef - object ClosureRef + callee *StateObject + object *StateObject Script []byte State *State @@ -37,7 +30,7 @@ type Closure struct { } // Create a new closure for the given data items -func NewClosure(callee, object ClosureRef, script []byte, state *State, gas, price, val *big.Int) *Closure { +func NewClosure(callee, object *StateObject, script []byte, state *State, gas, price, val *big.Int) *Closure { c := &Closure{callee: callee, object: object, Script: script, State: state, Args: nil} // In most cases gas, price and value are pointers to transaction objects @@ -108,11 +101,11 @@ func (c *Closure) ReturnGas(gas, price *big.Int, state *State) { c.Gas.Add(c.Gas, gas) } -func (c *Closure) Object() ClosureRef { +func (c *Closure) Object() *StateObject { return c.object } -func (c *Closure) Callee() ClosureRef { +func (c *Closure) Callee() *StateObject { return c.callee } |