Skip to content

Commit ce7ae4b

Browse files
committed
Sync with further updates from unstable
1 parent 0d0f48d commit ce7ae4b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

beacon_node/lighthouse_network/tests/rpc_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mod common;
44

55
use common::Protocol;
66
use lighthouse_network::rpc::{methods::*, RequestType};
7-
use lighthouse_network::service::api_types::{AppRequestId, SyncRequestId};
7+
use lighthouse_network::service::api_types::{AppRequestId, SingleLookupReqId, SyncRequestId};
88
use lighthouse_network::{rpc::max_rpc_size, rpc::RPCError, NetworkEvent, ReportSource, Response};
99
use slog::{debug, error, warn, Level};
1010
use ssz::Encode;
@@ -1331,7 +1331,7 @@ fn test_request_too_large() {
13311331

13321332
// RPC requests that triggers RPC error on the receiver side.
13331333
let max_request_blocks_count = spec.max_request_blocks(ForkName::Base) as u64;
1334-
let max_request_blobs_count = spec.max_request_blob_sidecars / E::max_blobs_per_block() as u64;
1334+
let max_request_blobs_count = spec.max_request_blob_sidecars(ForkName::Base) as u64 / spec.max_blobs_per_block_by_fork(ForkName::Base);
13351335
let mut rpc_requests = vec![
13361336
RequestType::BlocksByRange(OldBlocksByRangeRequest::new(
13371337
0,
@@ -1354,7 +1354,7 @@ fn test_request_too_large() {
13541354
NetworkEvent::PeerConnectedOutgoing(peer_id) => {
13551355
let request = rpc_requests.pop().unwrap();
13561356
debug!(log, "Sending RPC request"; "request_id" => request_id, "request" => ?request);
1357-
sender.send_request(peer_id, AppRequestId::Sync(SyncRequestId::RangeBlockAndBlobs { id: request_id }), request).unwrap();
1357+
sender.send_request(peer_id, AppRequestId::Sync(SyncRequestId::SingleBlock { id: SingleLookupReqId { lookup_id: request_id, req_id: request_id }}), request).unwrap();
13581358
}
13591359
NetworkEvent::ResponseReceived { id, response, .. } => {
13601360
debug!(log, "Received response"; "request_id" => ?id, "response" => ?response);
@@ -1373,7 +1373,7 @@ fn test_request_too_large() {
13731373
if let Some(request) = rpc_requests.pop() {
13741374
request_id += 1;
13751375
debug!(log, "Sending RPC request"; "request_id" => request_id, "request" => ?request);
1376-
sender.send_request(peer_id, AppRequestId::Sync(SyncRequestId::RangeBlockAndBlobs { id: request_id }), request).unwrap();
1376+
sender.send_request(peer_id, AppRequestId::Sync(SyncRequestId::SingleBlock { id: SingleLookupReqId { lookup_id: request_id, req_id: request_id }}), request).unwrap();
13771377
} else {
13781378
assert_eq!(failed_request_ids.len(), requests_to_be_failed);
13791379
// End the test.

0 commit comments

Comments
 (0)