Not fail when SendTx has transaction with incorrect RLP

This commit is contained in:
Alexey Akhunov 2019-06-04 13:53:13 +01:00
parent d0d0a8881c
commit a58ab05fc0

View file

@ -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)