mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
eth: handle TransactionToMessage error in stateAtTransaction
This commit is contained in:
parent
b19452dc11
commit
3c174d72a0
1 changed files with 4 additions and 1 deletions
|
|
@ -261,7 +261,10 @@ func (eth *Ethereum) stateAtTransaction(ctx context.Context, block *types.Block,
|
||||||
return tx, context, statedb, release, nil
|
return tx, context, statedb, release, nil
|
||||||
}
|
}
|
||||||
// Assemble the transaction call message and return if the requested offset
|
// Assemble the transaction call message and return if the requested offset
|
||||||
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee())
|
msg, err := core.TransactionToMessage(tx, signer, block.BaseFee())
|
||||||
|
if err != nil {
|
||||||
|
return nil, vm.BlockContext{}, nil, nil, fmt.Errorf("transaction %#x invalid: %w", tx.Hash(), err)
|
||||||
|
}
|
||||||
|
|
||||||
// Not yet the searched for transaction, execute on top of the current state
|
// Not yet the searched for transaction, execute on top of the current state
|
||||||
statedb.SetTxContext(tx.Hash(), idx)
|
statedb.SetTxContext(tx.Hash(), idx)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue