Commit 3520771d authored by obscuren's avatar obscuren

Comply to Callee interface

parent c17381b8
......@@ -29,6 +29,15 @@ func NewTransaction(to []byte, value *big.Int, data []string) *Transaction {
return &tx
}
// Implements Callee
func (tx *Transaction) ReturnGas(value *big.Int, state *State) {
// Return the value back to the sender
sender := tx.Sender()
account := state.GetAccount(sender)
account.AddFunds(value)
state.UpdateAccount(sender, account)
}
// XXX Deprecated
func NewTransactionFromData(data []byte) *Transaction {
return NewTransactionFromBytes(data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment