mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 22:49:34 +00:00
lint and fmt
This commit is contained in:
@@ -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)),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user