aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/closure.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-20 07:31:01 +0800
committerobscuren <geffobscura@gmail.com>2014-04-20 07:31:01 +0800
commit6930260962f4c6d1fe11d07a10300da96886ecd6 (patch)
treee8f07c89346cbf63a0dd35e9fec9e17ff7d84bf6 /ethchain/closure.go
parenta96c8c8af969665cc0c357eef81d43b5b7285dfe (diff)
downloaddexon-6930260962f4c6d1fe11d07a10300da96886ecd6.tar
dexon-6930260962f4c6d1fe11d07a10300da96886ecd6.tar.gz
dexon-6930260962f4c6d1fe11d07a10300da96886ecd6.tar.bz2
dexon-6930260962f4c6d1fe11d07a10300da96886ecd6.tar.lz
dexon-6930260962f4c6d1fe11d07a10300da96886ecd6.tar.xz
dexon-6930260962f4c6d1fe11d07a10300da96886ecd6.tar.zst
dexon-6930260962f4c6d1fe11d07a10300da96886ecd6.zip
Updated VM
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 5c508179e..defd8b5c8 100644
--- a/ethchain/closure.go
+++ b/ethchain/closure.go
@@ -8,7 +8,7 @@ import (
)
type Callee interface {
- ReturnGas(*big.Int, *State)
+ ReturnGas(*big.Int, *big.Int, *State)
Address() []byte
}
@@ -83,18 +83,16 @@ func (c *Closure) Return(ret []byte) []byte {
// If no callee is present return it to
// the origin (i.e. contract or tx)
if c.callee != nil {
- c.callee.ReturnGas(c.Gas, c.State)
+ c.callee.ReturnGas(c.Gas, c.Price, c.State)
} else {
- c.object.ReturnGas(c.Gas, c.State)
- // TODO incase it's a POST contract we gotta serialise the contract again.
- // But it's not yet defined
+ c.object.ReturnGas(c.Gas, c.Price, c.State)
}
return ret
}
// Implement the Callee interface
-func (c *Closure) ReturnGas(gas *big.Int, state *State) {
+func (c *Closure) ReturnGas(gas, price *big.Int, state *State) {
// Return the gas to the closure
c.Gas.Add(c.Gas, gas)
}