mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-24 20:47:17 +00:00
v0.6: remove some FIXMEs
This commit is contained in:
parent
8c5964a758
commit
1823378bfa
@ -450,10 +450,10 @@ impl<T: EthSpec> BeaconState<T> {
|
||||
Ok(&self.latest_block_roots[i])
|
||||
}
|
||||
|
||||
/// Return the block root at a recent `slot`.
|
||||
/// Return the block root at a recent `epoch`.
|
||||
///
|
||||
/// Spec v0.6.0
|
||||
// FIXME(sproul): name swap with get_block_root
|
||||
// NOTE: the spec calls this get_block_root
|
||||
pub fn get_block_root_at_epoch(&self, epoch: Epoch) -> Result<&Hash256, BeaconStateError> {
|
||||
self.get_block_root(epoch.start_slot(T::slots_per_epoch()))
|
||||
}
|
||||
@ -854,8 +854,6 @@ impl<T: EthSpec> BeaconState<T> {
|
||||
self.committee_caches[Self::cache_index(relative_epoch)] = CommitteeCache::default();
|
||||
}
|
||||
|
||||
// FIXME(sproul): drop_previous/current_committee_cache
|
||||
|
||||
/// Updates the pubkey cache, if required.
|
||||
///
|
||||
/// Adds all `pubkeys` from the `validator_registry` which are not already in the cache. Will
|
||||
|
@ -175,7 +175,7 @@ impl<T: EthSpec> TestingBeaconStateBuilder<T> {
|
||||
|
||||
state.slot = slot;
|
||||
|
||||
// FIXME(sproul): update latest_start_shard?
|
||||
// NOTE: we could update the latest start shard here
|
||||
|
||||
state.previous_justified_epoch = epoch - 3;
|
||||
state.current_justified_epoch = epoch - 2;
|
||||
|
@ -23,12 +23,18 @@ impl TestingPendingAttestationBuilder {
|
||||
) -> Self {
|
||||
let data_builder = TestingAttestationDataBuilder::new(state, shard, slot, spec);
|
||||
|
||||
let relative_epoch =
|
||||
RelativeEpoch::from_epoch(state.current_epoch(), slot.epoch(T::slots_per_epoch()))
|
||||
.expect("epoch out of bounds");
|
||||
let proposer_index = state
|
||||
.get_beacon_proposer_index(slot, relative_epoch, spec)
|
||||
.unwrap() as u64;
|
||||
|
||||
let pending_attestation = PendingAttestation {
|
||||
aggregation_bitfield: Bitfield::new(),
|
||||
data: data_builder.build(),
|
||||
inclusion_delay: spec.min_attestation_inclusion_delay,
|
||||
// FIXME(sproul)
|
||||
proposer_index: 0,
|
||||
proposer_index,
|
||||
};
|
||||
|
||||
Self {
|
||||
|
Loading…
Reference in New Issue
Block a user