mirror of
https://github.com/status-im/op-geth.git
synced 2025-02-21 02:58:28 +00:00
Comply to Callee interface
This commit is contained in:
parent
c17381b853
commit
3520771d68
@ -29,6 +29,15 @@ func NewTransaction(to []byte, value *big.Int, data []string) *Transaction {
|
|||||||
return &tx
|
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
|
// XXX Deprecated
|
||||||
func NewTransactionFromData(data []byte) *Transaction {
|
func NewTransactionFromData(data []byte) *Transaction {
|
||||||
return NewTransactionFromBytes(data)
|
return NewTransactionFromBytes(data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user