aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/closure.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-10 08:04:06 +0800
committerobscuren <geffobscura@gmail.com>2014-05-10 08:04:06 +0800
commit3af35d922e5751dcf265d31abf293b759e570fec (patch)
tree5dbfdb50177d9c7ededabb240f7e792d1174505b /ethchain/closure.go
parent2096b3a9edb3289a8f30da81704181dec7b39917 (diff)
parentdbf8645aafb19837d01b939ba9b1d3e1a2fffbf9 (diff)
downloaddexon-3af35d922e5751dcf265d31abf293b759e570fec.tar
dexon-3af35d922e5751dcf265d31abf293b759e570fec.tar.gz
dexon-3af35d922e5751dcf265d31abf293b759e570fec.tar.bz2
dexon-3af35d922e5751dcf265d31abf293b759e570fec.tar.lz
dexon-3af35d922e5751dcf265d31abf293b759e570fec.tar.xz
dexon-3af35d922e5751dcf265d31abf293b759e570fec.tar.zst
dexon-3af35d922e5751dcf265d31abf293b759e570fec.zip
Merge branch 'release/poc5-rc2'
Diffstat (limited to 'ethchain/closure.go')
-rw-r--r--ethchain/closure.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/ethchain/closure.go b/ethchain/closure.go
index 7e911ad99..59194e4e8 100644
--- a/ethchain/closure.go
+++ b/ethchain/closure.go
@@ -11,7 +11,7 @@ type ClosureRef interface {
ReturnGas(*big.Int, *big.Int, *State)
Address() []byte
GetMem(*big.Int) *ethutil.Value
- SetMem(*big.Int, *ethutil.Value)
+ SetStore(*big.Int, *ethutil.Value)
N() *big.Int
}
@@ -24,20 +24,18 @@ type Closure struct {
Gas *big.Int
Price *big.Int
- Value *big.Int
Args []byte
}
// Create a new closure for the given data items
-func NewClosure(callee, object *StateObject, script []byte, state *State, gas, price, val *big.Int) *Closure {
+func NewClosure(callee, object *StateObject, script []byte, state *State, gas, price *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
// and we don't want the transaction's values to change.
c.Gas = new(big.Int).Set(gas)
c.Price = new(big.Int).Set(price)
- c.Value = new(big.Int).Set(val)
return c
}
@@ -66,8 +64,8 @@ func (c *Closure) Gets(x, y *big.Int) *ethutil.Value {
return ethutil.NewValue(partial)
}
-func (c *Closure) SetMem(x *big.Int, val *ethutil.Value) {
- c.object.SetMem(x, val)
+func (c *Closure) SetStorage(x *big.Int, val *ethutil.Value) {
+ c.object.SetStorage(x, val)
}
func (c *Closure) Address() []byte {