Fix some todos

This commit is contained in:
Pawan Dhananjay
2024-08-30 16:04:11 -07:00
parent a9cb329a22
commit 60100fc6be
3 changed files with 1 additions and 7 deletions

View File

@@ -1249,10 +1249,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
pub fn get_blobs(&self, block_root: &Hash256) -> Result<BlobSidecarList<T::EthSpec>, Error> { pub fn get_blobs(&self, block_root: &Hash256) -> Result<BlobSidecarList<T::EthSpec>, Error> {
match self.store.get_blobs(block_root)? { match self.store.get_blobs(block_root)? {
Some(blobs) => Ok(blobs), Some(blobs) => Ok(blobs),
None => Ok(BlobSidecarList::empty( None => Ok(BlobSidecarList::empty_uninitialized()),
// TODO(pawan): fix this
self.spec.max_blobs_per_block(Epoch::new(0)) as usize,
)),
} }
} }

View File

@@ -1239,8 +1239,6 @@ fn to_fixed_blob_sidecar_list<E: EthSpec>(
blobs: Vec<Arc<BlobSidecar<E>>>, blobs: Vec<Arc<BlobSidecar<E>>>,
max_len: usize, max_len: usize,
) -> Result<FixedBlobSidecarList<E>, LookupVerifyError> { ) -> 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]); let mut fixed_list = FixedBlobSidecarList::new(vec![None; max_len]);
for blob in blobs.into_iter() { for blob in blobs.into_iter() {
let index = blob.index as usize; let index = blob.index as usize;

View File

@@ -1176,7 +1176,6 @@ impl ChainSpec {
max_request_data_column_sidecars: default_max_request_data_column_sidecars(), max_request_data_column_sidecars: default_max_request_data_column_sidecars(),
min_epochs_for_blob_sidecars_requests: 16384, min_epochs_for_blob_sidecars_requests: 16384,
blob_sidecar_subnet_count: default_blob_sidecar_subnet_count(), 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(), max_blobs_per_block: default_max_blobs_per_block(),
/* /*