From c4b2f1c8ac132db8220f8767fa58846f1ba40470 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Mon, 15 May 2023 12:37:51 -0400 Subject: [PATCH] fix count usage in blobs by range (#4289) --- beacon_node/lighthouse_network/src/rpc/outbound.rs | 2 +- beacon_node/lighthouse_network/src/rpc/protocol.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/lighthouse_network/src/rpc/outbound.rs b/beacon_node/lighthouse_network/src/rpc/outbound.rs index 6115f874e..a75ec1250 100644 --- a/beacon_node/lighthouse_network/src/rpc/outbound.rs +++ b/beacon_node/lighthouse_network/src/rpc/outbound.rs @@ -112,7 +112,7 @@ impl OutboundRequest { OutboundRequest::Goodbye(_) => 0, OutboundRequest::BlocksByRange(req) => req.count, OutboundRequest::BlocksByRoot(req) => req.block_roots.len() as u64, - OutboundRequest::BlobsByRange(req) => req.count, + OutboundRequest::BlobsByRange(req) => req.count * TSpec::max_blobs_per_block() as u64, OutboundRequest::BlobsByRoot(req) => req.blob_ids.len() as u64, OutboundRequest::Ping(_) => 1, OutboundRequest::MetaData(_) => 1, diff --git a/beacon_node/lighthouse_network/src/rpc/protocol.rs b/beacon_node/lighthouse_network/src/rpc/protocol.rs index ed3b5a779..ea6293cf9 100644 --- a/beacon_node/lighthouse_network/src/rpc/protocol.rs +++ b/beacon_node/lighthouse_network/src/rpc/protocol.rs @@ -528,7 +528,7 @@ impl InboundRequest { InboundRequest::Goodbye(_) => 0, InboundRequest::BlocksByRange(req) => req.count, InboundRequest::BlocksByRoot(req) => req.block_roots.len() as u64, - InboundRequest::BlobsByRange(req) => req.count, + InboundRequest::BlobsByRange(req) => req.count * TSpec::max_blobs_per_block() as u64, InboundRequest::BlobsByRoot(req) => req.blob_ids.len() as u64, InboundRequest::Ping(_) => 1, InboundRequest::MetaData(_) => 1,