Remove unused spec field from AvailableBlock (#9411)

N/A


  Remove unused spec field from AvailableBlock


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
Lion - dapplion
2026-06-04 21:14:32 +02:00
committed by GitHub
parent d98de9f8dd
commit eeae8514b1
2 changed files with 1 additions and 7 deletions

View File

@@ -861,8 +861,6 @@ pub struct AvailableBlock<E: EthSpec> {
#[educe(Hash(ignore))] #[educe(Hash(ignore))]
/// Timestamp at which this block first became available (UNIX timestamp, time since 1970). /// Timestamp at which this block first became available (UNIX timestamp, time since 1970).
blobs_available_timestamp: Option<Duration>, blobs_available_timestamp: Option<Duration>,
#[educe(Hash(ignore))]
pub spec: Arc<ChainSpec>,
} }
impl<E: EthSpec> AvailableBlock<E> { impl<E: EthSpec> AvailableBlock<E> {
@@ -952,7 +950,6 @@ impl<E: EthSpec> AvailableBlock<E> {
block, block,
blob_data: block_data, blob_data: block_data,
blobs_available_timestamp: None, blobs_available_timestamp: None,
spec: spec.clone(),
}) })
} }
@@ -1007,7 +1004,6 @@ impl<E: EthSpec> AvailableBlock<E> {
} }
}, },
blobs_available_timestamp: self.blobs_available_timestamp, blobs_available_timestamp: self.blobs_available_timestamp,
spec: self.spec.clone(),
}) })
} }
} }

View File

@@ -200,7 +200,6 @@ impl<E: EthSpec> PendingComponents<E> {
/// must be persisted in the DB along with the block. /// must be persisted in the DB along with the block.
pub fn make_available( pub fn make_available(
&self, &self,
spec: &Arc<ChainSpec>,
num_expected_columns_opt: Option<usize>, num_expected_columns_opt: Option<usize>,
) -> Result<Option<AvailableExecutedBlock<E>>, AvailabilityCheckError> { ) -> Result<Option<AvailableExecutedBlock<E>>, AvailabilityCheckError> {
let Some(CachedBlock::Executed(block)) = &self.block else { let Some(CachedBlock::Executed(block)) = &self.block else {
@@ -271,7 +270,6 @@ impl<E: EthSpec> PendingComponents<E> {
block: block.clone(), block: block.clone(),
blob_data, blob_data,
blobs_available_timestamp, blobs_available_timestamp,
spec: spec.clone(),
}; };
self.span.in_scope(|| { self.span.in_scope(|| {
@@ -529,7 +527,7 @@ impl<T: BeaconChainTypes> DataAvailabilityCheckerInner<T> {
num_expected_columns_opt: Option<usize>, num_expected_columns_opt: Option<usize>,
) -> Result<Availability<T::EthSpec>, AvailabilityCheckError> { ) -> Result<Availability<T::EthSpec>, AvailabilityCheckError> {
if let Some(available_block) = if let Some(available_block) =
pending_components.make_available(&self.spec, num_expected_columns_opt)? pending_components.make_available(num_expected_columns_opt)?
{ {
// Explicitly drop read lock before acquiring write lock // Explicitly drop read lock before acquiring write lock
drop(pending_components); drop(pending_components);