Commit 27f7aa01 authored by Felix Lange's avatar Felix Lange

core: adapt Message for new Transaction.From signature

parent b95387a0
......@@ -81,7 +81,8 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated
_, gas, err := ApplyMessage(NewEnv(statedb, self.bc, tx, block), tx, cb)
if err != nil && (IsNonceErr(err) || state.IsGasLimitErr(err) || IsInvalidTxErr(err)) {
// If the account is managed, remove the invalid nonce.
self.bc.TxState().RemoveNonce(tx.From(), tx.Nonce())
from, _ := tx.From()
self.bc.TxState().RemoveNonce(from, tx.Nonce())
return nil, nil, err
}
......
......@@ -44,9 +44,10 @@ type StateTransition struct {
env vm.Environment
}
// Message represents a message sent to a contract.
type Message interface {
From() common.Address
To() common.Address
From() (common.Address, error)
To() *common.Address
GasPrice() *big.Int
Gas() *big.Int
......
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