mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Clean up some FIXMEs
This commit is contained in:
@@ -337,8 +337,6 @@ fn discard_votes_before_justified_slot() {
|
||||
|
||||
let (genesis_root, genesis_slot) = *harness.honest_roots.last().unwrap();
|
||||
|
||||
dbg!(&harness.honest_roots);
|
||||
|
||||
// Add attestations from all validators for all honest blocks.
|
||||
for (root, slot) in harness.honest_roots.iter().rev() {
|
||||
for i in 0..VALIDATOR_COUNT {
|
||||
@@ -353,6 +351,10 @@ fn discard_votes_before_justified_slot() {
|
||||
"Honest head should be selected"
|
||||
);
|
||||
|
||||
// Head from one slot after genesis should still be genesis, because the successor
|
||||
// block of the genesis block has slot `genesis_slot + 1` which isn't greater than
|
||||
// the slot we're starting from. This is a very artifical test, but one that's easy to
|
||||
// describe.
|
||||
assert_eq!(
|
||||
lmd.find_head(
|
||||
genesis_slot + 1,
|
||||
@@ -362,13 +364,6 @@ fn discard_votes_before_justified_slot() {
|
||||
Ok(genesis_root)
|
||||
);
|
||||
}
|
||||
|
||||
let head = harness.harness.chain.head();
|
||||
|
||||
dbg!(&harness.honest_roots);
|
||||
dbg!(head.beacon_state.current_justified_checkpoint);
|
||||
|
||||
// assert!(false);
|
||||
}
|
||||
|
||||
/// Ensures that the finalized root can be set to all values in `roots`.
|
||||
|
||||
@@ -856,7 +856,7 @@ fn invalid_attestation_bad_target_epoch() {
|
||||
);
|
||||
}
|
||||
|
||||
/* FIXME(sproul)
|
||||
/* FIXME: needs updating for v0.9
|
||||
#[test]
|
||||
fn invalid_attestation_bad_shard() {
|
||||
let spec = MainnetEthSpec::default_spec();
|
||||
|
||||
@@ -108,7 +108,7 @@ pub trait EthSpec: 'static + Default + Sync + Send + Clone + Debug + PartialEq {
|
||||
///
|
||||
/// Spec v0.9.1
|
||||
fn slots_per_eth1_voting_period() -> usize {
|
||||
Self::EpochsPerHistoricalVector::to_usize()
|
||||
Self::SlotsPerEth1VotingPeriod::to_usize()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ impl TestingAttestationDataBuilder {
|
||||
let beacon_block_root = *state.get_block_root(slot).unwrap();
|
||||
|
||||
match test_task {
|
||||
// FIXME(sproul)
|
||||
AttestationTestTask::NoCommiteeForShard => index += 2,
|
||||
// FIXME: re-enable the shard-like tests
|
||||
// AttestationTestTask::NoCommiteeForShard => index += 2,
|
||||
// AttestationTestTask::BadShard => index = T::ShardCount::to_u64(),
|
||||
AttestationTestTask::IncludedTooEarly => {
|
||||
slot = state.slot - spec.min_attestation_inclusion_delay + 1
|
||||
|
||||
@@ -13,7 +13,7 @@ impl<T: EthSpec> TestingPendingAttestationBuilder<T> {
|
||||
///
|
||||
/// The `inclusion_delay` will be set to `MIN_ATTESTATION_INCLUSION_DELAY`.
|
||||
///
|
||||
/// * The aggregation and custody bitfields will all be empty, they need to be set with
|
||||
/// * The aggregation bitfield will be empty, it needs to be set with
|
||||
/// `Self::add_committee_participation`.
|
||||
pub fn new(
|
||||
test_task: AttestationTestTask,
|
||||
|
||||
Reference in New Issue
Block a user