lint and fmt

This commit is contained in:
Pawan Dhananjay
2026-05-27 11:03:36 -07:00
parent e867441220
commit e015425c6a
3 changed files with 18 additions and 16 deletions

View File

@@ -3180,16 +3180,16 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
Err(BlockError::DuplicateFullyImported(block_root)) => {
// For Gloas blocks that are already imported, we still
// need to process the envelope.
if let Some(envelope) = maybe_envelope {
if let Err(e) =
if let Some(envelope) = maybe_envelope
&& let Err(e) =
self.process_range_sync_envelope(envelope, block_root).await
{
return ChainSegmentResult::Failed {
imported_blocks,
error: BlockError::EnvelopeError(Box::new(e)),
};
}
{
return ChainSegmentResult::Failed {
imported_blocks,
error: BlockError::EnvelopeError(Box::new(e)),
};
}
continue;
}
Err(error) => {
@@ -3201,13 +3201,13 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
}
// Process the envelope after the block has been imported.
if let Some(envelope) = maybe_envelope {
if let Err(e) = self.process_range_sync_envelope(envelope, block_root).await {
return ChainSegmentResult::Failed {
imported_blocks,
error: BlockError::EnvelopeError(Box::new(e)),
};
}
if let Some(envelope) = maybe_envelope
&& let Err(e) = self.process_range_sync_envelope(envelope, block_root).await
{
return ChainSegmentResult::Failed {
imported_blocks,
error: BlockError::EnvelopeError(Box::new(e)),
};
}
}
}

View File

@@ -594,6 +594,7 @@ pub(crate) fn process_block_slash_info<T: BeaconChainTypes, TErr: BlockBlobError
/// The given `chain_segment` must contain only blocks from the same epoch, otherwise an error
/// will be returned.
#[instrument(skip_all)]
#[allow(clippy::type_complexity)]
pub fn signature_verify_chain_segment<T: BeaconChainTypes>(
mut chain_segment: Vec<(Hash256, RangeSyncBlock<T::EthSpec>)>,
chain: &BeaconChain<T>,

View File

@@ -620,7 +620,8 @@ mod tests {
chain.spec.clone(),
)
.unwrap()
.into_available_block();
.into_available_block(&chain.data_availability_checker, chain.spec.clone())
.unwrap();
let current_slot = harness.get_current_slot();
let cached_head = chain.canonical_head.cached_head();