From 21724f7ef960f0f2df0d2b0f3cccfd030a4aaee8 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 30 Apr 2014 14:43:32 +0200 Subject: Added manifest changes and changed closures --- ethchain/closure.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'ethchain/closure.go') 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 } -- cgit v1.2.3