mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Restrict network limits based on merge fork epoch (#2839)
This commit is contained in:
committed by
Paul Hauner
parent
144978f8f8
commit
f3c237cfa0
@@ -2,7 +2,7 @@ use std::marker::PhantomData;
|
||||
|
||||
use super::methods::*;
|
||||
use super::protocol::Protocol;
|
||||
use super::protocol::{ProtocolId, MAX_RPC_SIZE};
|
||||
use super::protocol::ProtocolId;
|
||||
use super::RPCError;
|
||||
use crate::rpc::protocol::Encoding;
|
||||
use crate::rpc::protocol::Version;
|
||||
@@ -29,6 +29,7 @@ use types::{EthSpec, ForkContext};
|
||||
pub struct OutboundRequestContainer<TSpec: EthSpec> {
|
||||
pub req: OutboundRequest<TSpec>,
|
||||
pub fork_context: Arc<ForkContext>,
|
||||
pub max_rpc_size: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
@@ -150,7 +151,7 @@ where
|
||||
Encoding::SSZSnappy => {
|
||||
let ssz_snappy_codec = BaseOutboundCodec::new(SSZSnappyOutboundCodec::new(
|
||||
protocol,
|
||||
MAX_RPC_SIZE,
|
||||
self.max_rpc_size,
|
||||
self.fork_context.clone(),
|
||||
));
|
||||
OutboundCodec::SSZSnappy(ssz_snappy_codec)
|
||||
|
||||
Reference in New Issue
Block a user