aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/closure.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-07-15 01:50:06 +0800
committerzelig <viktor.tron@gmail.com>2014-07-15 01:50:06 +0800
commit3d5db7288f134fef7e51b25776007705f6663654 (patch)
treeedda6e8fd23584327473058411df9cd2c53241f4 /ethchain/closure.go
parentdc11b5c55e2888a7a3dac51fedc3864d112136ce (diff)
parent8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9 (diff)
downloadgo-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.gz
go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.zst
go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.zip
merge upstream
Diffstat (limited to 'ethchain/closure.go')
-rw-r--r--ethchain/closure.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/ethchain/closure.go b/ethchain/closure.go
index cc769de30..1f7f8d703 100644
--- a/ethchain/closure.go
+++ b/ethchain/closure.go
@@ -84,13 +84,7 @@ func (c *Closure) Call(vm *Vm, args []byte) ([]byte, *big.Int, error) {
func (c *Closure) Return(ret []byte) []byte {
// Return the remaining gas to the caller
- // If no caller is present return it to
- // the origin (i.e. contract or tx)
- if c.caller != nil {
- c.caller.ReturnGas(c.Gas, c.Price, c.State)
- } else {
- c.object.ReturnGas(c.Gas, c.Price, c.State)
- }
+ c.caller.ReturnGas(c.Gas, c.Price, c.State)
return ret
}