Skip to content

Commit

Permalink
Fix some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed Aug 30, 2024
1 parent a9cb329 commit 60100fc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1249,10 +1249,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
pub fn get_blobs(&self, block_root: &Hash256) -> Result<BlobSidecarList<T::EthSpec>, Error> {
match self.store.get_blobs(block_root)? {
Some(blobs) => Ok(blobs),
None => Ok(BlobSidecarList::empty(
// TODO(pawan): fix this
self.spec.max_blobs_per_block(Epoch::new(0)) as usize,
)),
None => Ok(BlobSidecarList::empty_uninitialized()),
}
}

Expand Down
2 changes: 0 additions & 2 deletions beacon_node/network/src/sync/network_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1239,8 +1239,6 @@ fn to_fixed_blob_sidecar_list<E: EthSpec>(
blobs: Vec<Arc<BlobSidecar<E>>>,
max_len: usize,
) -> Result<FixedBlobSidecarList<E>, LookupVerifyError> {
// TODO(pawan): have a method on fixed runtime vector that just initializes a raw vec with max_len = None
// to signify an empty fixed runtime vector
let mut fixed_list = FixedBlobSidecarList::new(vec![None; max_len]);
for blob in blobs.into_iter() {
let index = blob.index as usize;
Expand Down
1 change: 0 additions & 1 deletion consensus/types/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,6 @@ impl ChainSpec {
max_request_data_column_sidecars: default_max_request_data_column_sidecars(),
min_epochs_for_blob_sidecars_requests: 16384,
blob_sidecar_subnet_count: default_blob_sidecar_subnet_count(),
// TODO(pawan): check if gnosis preset values match
max_blobs_per_block: default_max_blobs_per_block(),

/*
Expand Down

0 comments on commit 60100fc

Please sign in to comment.