Removed caller from tx and added "callership" to account.
Transactions can no longer serve as callers. Accounts are now the initial callee of closures. Transactions now serve as transport to call closures.
This commit is contained in:
@ -29,15 +29,6 @@ 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)
|
||||
|
Reference in New Issue
Block a user