mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Not fail when SendTx has transaction with incorrect RLP
This commit is contained in:
parent
d0d0a8881c
commit
a58ab05fc0
1 changed files with 2 additions and 1 deletions
|
|
@ -414,7 +414,8 @@ func (api *RetestethAPI) SetChainParams(ctx context.Context, chainParams ChainPa
|
|||
func (api *RetestethAPI) SendRawTransaction(ctx context.Context, rawTx hexutil.Bytes) (common.Hash, error) {
|
||||
tx := new(types.Transaction)
|
||||
if err := rlp.DecodeBytes(rawTx, tx); err != nil {
|
||||
return common.Hash{}, err
|
||||
// Return nil is not by mistake - some tests include sending transaction where gasLimit overflows uint64
|
||||
return common.Hash{}, nil
|
||||
}
|
||||
signer := types.MakeSigner(api.chainConfig, big.NewInt(int64(api.blockNumber)))
|
||||
sender, err := types.Sender(signer, tx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue