Skip to content

Commit 27f7aa0

Browse files
committed
core: adapt Message for new Transaction.From signature
1 parent b95387a commit 27f7aa0

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎core/block_processor.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated
8181
_, gas, err := ApplyMessage(NewEnv(statedb, self.bc, tx, block), tx, cb)
8282
if err != nil && (IsNonceErr(err) || state.IsGasLimitErr(err) || IsInvalidTxErr(err)) {
8383
// If the account is managed, remove the invalid nonce.
84-
self.bc.TxState().RemoveNonce(tx.From(), tx.Nonce())
84+
from, _ := tx.From()
85+
self.bc.TxState().RemoveNonce(from, tx.Nonce())
8586
return nil, nil, err
8687
}
8788

‎core/state_transition.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ type StateTransition struct {
4444
env vm.Environment
4545
}
4646

47+
// Message represents a message sent to a contract.
4748
type Message interface {
48-
From() common.Address
49-
To() common.Address
49+
From() (common.Address, error)
50+
To() *common.Address
5051

5152
GasPrice() *big.Int
5253
Gas() *big.Int

0 commit comments

Comments
 (0)