This commit is contained in:
Daniel Knopik
2026-04-29 13:06:07 +02:00
parent 2d3354551e
commit 7cf76ac7af
19 changed files with 59 additions and 119 deletions

View File

@@ -587,7 +587,6 @@ fn handle_rpc_request<E: EthSpec>(
decoded_buffer,
spec.max_request_blocks(current_fork),
)?,
fork_name: current_fork,
},
))),
SupportedProtocol::PingV1 => Ok(Some(RequestType::Ping(Ping {
@@ -1156,7 +1155,6 @@ mod tests {
spec.max_request_blocks(fork_name),
)
.unwrap(),
fork_name,
}
}

View File

@@ -12,7 +12,6 @@ use std::ops::Deref;
use std::sync::Arc;
use strum::IntoStaticStr;
use superstruct::superstruct;
use types::ForkName;
use types::data::BlobIdentifier;
use types::light_client::consts::MAX_REQUEST_LIGHT_CLIENT_UPDATES;
use types::{
@@ -563,21 +562,16 @@ impl BlobsByRootRequest {
pub struct DataColumnsByRootRequest<E: EthSpec> {
/// The list of beacon block roots and column indices being requested.
pub data_column_ids: RuntimeVariableList<DataColumnsByRootIdentifier<E>>,
pub fork_name: ForkName,
}
impl<E: EthSpec> DataColumnsByRootRequest<E> {
pub fn new(
data_column_ids: Vec<DataColumnsByRootIdentifier<E>>,
fork_name: ForkName,
max_request_blocks: usize,
) -> Result<Self, &'static str> {
let data_column_ids = RuntimeVariableList::new(data_column_ids, max_request_blocks)
.map_err(|_| "DataColumnsByRootRequest too many column IDs")?;
Ok(Self {
data_column_ids,
fork_name,
})
Ok(Self { data_column_ids })
}
pub fn max_requested(&self) -> usize {

View File

@@ -982,7 +982,6 @@ fn test_tcp_columns_by_root_chunked_rpc_for_fork(fork_name: ForkName) {
};
max_request_blocks
],
fork_name,
max_request_blocks,
)
.unwrap();
@@ -993,7 +992,6 @@ fn test_tcp_columns_by_root_chunked_rpc_for_fork(fork_name: ForkName) {
spec.max_request_blocks(fork_name),
)
.unwrap(),
fork_name,
};
assert_eq!(req, req_decoded);
let rpc_request = RequestType::DataColumnsByRoot(req);