Fix decoding max length (#2816)

## Issue Addressed

N/A

## Proposed Changes

Fix encoder max length to the correct value (`MAX_RPC_SIZE`).
This commit is contained in:
Pawan Dhananjay
2021-11-16 22:23:39 +00:00
parent a43a2448b7
commit e32c09bfda
3 changed files with 42 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ use std::marker::PhantomData;
use super::methods::*;
use super::protocol::Protocol;
use super::protocol::ProtocolId;
use super::protocol::{ProtocolId, MAX_RPC_SIZE};
use super::RPCError;
use crate::rpc::protocol::Encoding;
use crate::rpc::protocol::Version;
@@ -150,7 +150,7 @@ where
Encoding::SSZSnappy => {
let ssz_snappy_codec = BaseOutboundCodec::new(SSZSnappyOutboundCodec::new(
protocol,
usize::max_value(),
MAX_RPC_SIZE,
self.fork_context.clone(),
));
OutboundCodec::SSZSnappy(ssz_snappy_codec)