diff --git a/txpool/pool.go b/txpool/pool.go index 7dec14895..791298679 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -822,7 +822,7 @@ func (p *TxPool) ValidateSerializedTxn(serializedTxn []byte) error { txMaxSize = 4 * txSlotSize // 128KB ) if len(serializedTxn) > txMaxSize { - return fmt.Errorf(RLPTooLong.String()) + return types.ErrRlpTooBig } return nil } diff --git a/txpool/txpool_grpc_server.go b/txpool/txpool_grpc_server.go index fd12a9235..4484ea325 100644 --- a/txpool/txpool_grpc_server.go +++ b/txpool/txpool_grpc_server.go @@ -240,7 +240,7 @@ func mapDiscardReasonToProto(reason DiscardReason) txpool_proto.ImportResult { return txpool_proto.ImportResult_ALREADY_EXISTS case UnderPriced, ReplaceUnderpriced, FeeTooLow: return txpool_proto.ImportResult_FEE_TOO_LOW - case InvalidSender, NegativeValue, OversizedData, InitCodeTooLarge: + case InvalidSender, NegativeValue, OversizedData, InitCodeTooLarge, RLPTooLong: return txpool_proto.ImportResult_INVALID default: return txpool_proto.ImportResult_INTERNAL_ERROR