diff options
Diffstat (limited to 'core/state_transition.go')
-rw-r--r-- | core/state_transition.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/state_transition.go b/core/state_transition.go index fedea8021..4a8d92375 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -241,11 +241,9 @@ func (self *StateTransition) refundGas() { sender.AddBalance(remaining) uhalf := new(big.Int).Div(self.gasUsed(), common.Big2) - for addr, ref := range self.state.Refunds() { - refund := common.BigMin(uhalf, ref) - self.gas.Add(self.gas, refund) - self.state.AddBalance(common.StringToAddress(addr), refund.Mul(refund, self.msg.GasPrice())) - } + refund := common.BigMin(uhalf, self.state.Refunds()) + self.gas.Add(self.gas, refund) + self.state.AddBalance(sender.Address(), refund.Mul(refund, self.msg.GasPrice())) coinbase.RefundGas(self.gas, self.msg.GasPrice()) } |