mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 11:41:28 +00:00
Merge remote-tracking branch 'origin/paul-gossip-test' into validator-enhancements
This commit is contained in:
commit
b5ae39dda0
@ -227,7 +227,7 @@ impl ValidatorStatuses {
|
||||
status.is_previous_epoch_attester = true;
|
||||
|
||||
// The inclusion slot and distance are only required for previous epoch attesters.
|
||||
let relative_epoch = RelativeEpoch::from_slot(state.slot, a.data.slot, spec)?;
|
||||
let relative_epoch = RelativeEpoch::from_slot(state.slot, a.inclusion_slot, spec)?;
|
||||
status.inclusion_info = Some(InclusionInfo {
|
||||
slot: a.inclusion_slot,
|
||||
distance: inclusion_distance(a),
|
||||
|
@ -113,6 +113,16 @@ mod epoch_tests {
|
||||
|
||||
all_tests!(Epoch);
|
||||
|
||||
#[test]
|
||||
fn epoch_start_end() {
|
||||
let slots_per_epoch = 8;
|
||||
|
||||
let epoch = Epoch::new(0);
|
||||
|
||||
assert_eq!(epoch.start_slot(slots_per_epoch), Slot::new(0));
|
||||
assert_eq!(epoch.end_slot(slots_per_epoch), Slot::new(7));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn slot_iter() {
|
||||
let slots_per_epoch = 8;
|
||||
|
Loading…
Reference in New Issue
Block a user