mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-04 13:24:39 +00:00
Diff reduction
This commit is contained in:
@@ -1308,9 +1308,10 @@ async fn verify_block_for_gossip_doppelganger_detection() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
match indexed_attestation {
|
for index in match indexed_attestation {
|
||||||
IndexedAttestation::Base(indexed_attestation) => {
|
IndexedAttestation::Base(att) => att.attesting_indices.into_iter(),
|
||||||
for &index in &indexed_attestation.attesting_indices {
|
IndexedAttestation::Electra(att) => att.attesting_indices.into_iter(),
|
||||||
|
} {
|
||||||
let index = index as usize;
|
let index = index as usize;
|
||||||
|
|
||||||
assert!(harness.chain.validator_seen_at_epoch(index, epoch));
|
assert!(harness.chain.validator_seen_at_epoch(index, epoch));
|
||||||
@@ -1336,35 +1337,6 @@ async fn verify_block_for_gossip_doppelganger_detection() {
|
|||||||
.expect("should check if gossip aggregator was observed"));
|
.expect("should check if gossip aggregator was observed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IndexedAttestation::Electra(indexed_attestation) => {
|
|
||||||
for &index in &indexed_attestation.attesting_indices {
|
|
||||||
let index = index as usize;
|
|
||||||
|
|
||||||
assert!(harness.chain.validator_seen_at_epoch(index, epoch));
|
|
||||||
|
|
||||||
// Check the correct beacon cache is populated
|
|
||||||
assert!(harness
|
|
||||||
.chain
|
|
||||||
.observed_block_attesters
|
|
||||||
.read()
|
|
||||||
.validator_has_been_observed(epoch, index)
|
|
||||||
.expect("should check if block attester was observed"));
|
|
||||||
assert!(!harness
|
|
||||||
.chain
|
|
||||||
.observed_gossip_attesters
|
|
||||||
.read()
|
|
||||||
.validator_has_been_observed(epoch, index)
|
|
||||||
.expect("should check if gossip attester was observed"));
|
|
||||||
assert!(!harness
|
|
||||||
.chain
|
|
||||||
.observed_aggregators
|
|
||||||
.read()
|
|
||||||
.validator_has_been_observed(epoch, index)
|
|
||||||
.expect("should check if gossip aggregator was observed"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|||||||
Reference in New Issue
Block a user