fix count usage in blobs by range (#4289)
This commit is contained in:
parent
46db30416d
commit
c4b2f1c8ac
@ -112,7 +112,7 @@ impl<TSpec: EthSpec> OutboundRequest<TSpec> {
|
|||||||
OutboundRequest::Goodbye(_) => 0,
|
OutboundRequest::Goodbye(_) => 0,
|
||||||
OutboundRequest::BlocksByRange(req) => req.count,
|
OutboundRequest::BlocksByRange(req) => req.count,
|
||||||
OutboundRequest::BlocksByRoot(req) => req.block_roots.len() as u64,
|
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::BlobsByRoot(req) => req.blob_ids.len() as u64,
|
||||||
OutboundRequest::Ping(_) => 1,
|
OutboundRequest::Ping(_) => 1,
|
||||||
OutboundRequest::MetaData(_) => 1,
|
OutboundRequest::MetaData(_) => 1,
|
||||||
|
@ -528,7 +528,7 @@ impl<TSpec: EthSpec> InboundRequest<TSpec> {
|
|||||||
InboundRequest::Goodbye(_) => 0,
|
InboundRequest::Goodbye(_) => 0,
|
||||||
InboundRequest::BlocksByRange(req) => req.count,
|
InboundRequest::BlocksByRange(req) => req.count,
|
||||||
InboundRequest::BlocksByRoot(req) => req.block_roots.len() as u64,
|
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::BlobsByRoot(req) => req.blob_ids.len() as u64,
|
||||||
InboundRequest::Ping(_) => 1,
|
InboundRequest::Ping(_) => 1,
|
||||||
InboundRequest::MetaData(_) => 1,
|
InboundRequest::MetaData(_) => 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user