aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-27 03:26:37 +0800
committerobscuren <geffobscura@gmail.com>2015-02-27 03:26:37 +0800
commit3ab05ddd25aa805510ac304c1fd8f7c5c620dff4 (patch)
tree0c635cb4987c727d4861956666ede1628e4fa09e /core
parent76f6d75ef867e754264834fc7171d1a12f24c5bb (diff)
downloaddexon-3ab05ddd25aa805510ac304c1fd8f7c5c620dff4.tar.gz
dexon-3ab05ddd25aa805510ac304c1fd8f7c5c620dff4.tar.zst
dexon-3ab05ddd25aa805510ac304c1fd8f7c5c620dff4.zip
Bump
Diffstat (limited to 'core')
-rw-r--r--core/state_transition.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index a065c4f6b..7331fdd4a 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -251,16 +251,13 @@ func (self *StateTransition) RefundGas() {
coinbase, sender := self.Coinbase(), self.From()
// Return remaining gas
remaining := new(big.Int).Mul(self.gas, self.msg.GasPrice())
- fmt.Println("REFUND:", remaining)
sender.AddBalance(remaining)
uhalf := new(big.Int).Div(self.GasUsed(), ethutil.Big2)
for addr, ref := range self.state.Refunds() {
refund := ethutil.BigMin(uhalf, ref)
self.gas.Add(self.gas, refund)
- addToIt := refund.Mul(refund, self.msg.GasPrice())
- fmt.Println("ADD TO IT", addToIt)
- self.state.AddBalance([]byte(addr), addToIt)
+ self.state.AddBalance([]byte(addr), refund.Mul(refund, self.msg.GasPrice()))
}
coinbase.RefundGas(self.gas, self.msg.GasPrice())