mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Rust clippy 1.87 lint fixes (#7471)
Fix clippy lints for `rustc` 1.87 clippy complains about `BeaconChainError` being too large. I went on a bit of a boxing spree because of this. We may instead want to `Box` some of the `BeaconChainError` variants?
This commit is contained in:
@@ -508,13 +508,11 @@ async fn justified_checkpoint_becomes_invalid() {
|
||||
let is_valid = Payload::Invalid {
|
||||
latest_valid_hash: Some(parent_hash_of_justified),
|
||||
};
|
||||
rig.import_block_parametric(is_valid, is_valid, None, |error| {
|
||||
matches!(
|
||||
error,
|
||||
// The block import should fail since the beacon chain knows the justified payload
|
||||
// is invalid.
|
||||
BlockError::BeaconChainError(BeaconChainError::JustifiedPayloadInvalid { .. })
|
||||
)
|
||||
rig.import_block_parametric(is_valid, is_valid, None, |error| match error {
|
||||
BlockError::BeaconChainError(e) => {
|
||||
matches!(e.as_ref(), BeaconChainError::JustifiedPayloadInvalid { .. })
|
||||
}
|
||||
_ => false,
|
||||
})
|
||||
.await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user