Skip to content

Commit

Permalink
Fix incorrect value set for blobs_by_root_request rpc limit. (#5181)
Browse files Browse the repository at this point in the history
* Fix incorrect value set for `blobs_by_root_request` rpc limit.
  • Loading branch information
jimmygchen authored Feb 5, 2024
1 parent 39e9f7d commit 8fa11aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions consensus/types/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::application_domain::{ApplicationDomain, APPLICATION_DOMAIN_BUILDER};
use crate::blob_sidecar::BlobIdentifier;
use crate::*;
use int_to_bytes::int_to_bytes4;
use serde::Deserialize;
Expand Down Expand Up @@ -1292,8 +1293,13 @@ fn max_blocks_by_root_request_common(max_request_blocks: u64) -> usize {

fn max_blobs_by_root_request_common(max_request_blob_sidecars: u64) -> usize {
let max_request_blob_sidecars = max_request_blob_sidecars as usize;
RuntimeVariableList::<Hash256>::from_vec(
vec![Hash256::zero(); max_request_blob_sidecars],
let empty_blob_identifier = BlobIdentifier {
block_root: Hash256::zero(),
index: 0,
};

RuntimeVariableList::<BlobIdentifier>::from_vec(
vec![empty_blob_identifier; max_request_blob_sidecars],
max_request_blob_sidecars,
)
.as_ssz_bytes()
Expand Down

0 comments on commit 8fa11aa

Please sign in to comment.