mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
Quick fix on a pseudocode typo (#1106)
This commit is contained in:
parent
53749c49d0
commit
5c7539e2a1
@ -13,8 +13,8 @@ import (
|
||||
// included in the chain during the epoch.
|
||||
//
|
||||
// Spec pseudocode definition:
|
||||
// this_epoch_attestations = [a for a in state.latest_attestations
|
||||
// if state.slot - EPOCH_LENGTH <= a.data.slot < state.slot]
|
||||
// [a for a in state.latest_attestations if state.slot - EPOCH_LENGTH <=
|
||||
// a.data.slot < state.slot]
|
||||
func Attestations(state *pb.BeaconState) []*pb.PendingAttestationRecord {
|
||||
epochLength := params.BeaconConfig().EpochLength
|
||||
var thisEpochAttestations []*pb.PendingAttestationRecord
|
||||
@ -42,7 +42,7 @@ func Attestations(state *pb.BeaconState) []*pb.PendingAttestationRecord {
|
||||
// Spec pseudocode definition:
|
||||
// [a for a in this_epoch_attestations if a.data.epoch_boundary_root ==
|
||||
// get_block_root(state, state.slot-EPOCH_LENGTH) and a.justified_slot ==
|
||||
// if state.slot - EPOCH_LENGTH <= a.data.slot < state.slot]
|
||||
// state.justified_slot]
|
||||
func BoundaryAttestations(
|
||||
state *pb.BeaconState,
|
||||
thisEpochAttestations []*pb.PendingAttestationRecord,
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
|
||||
func TestEpochAttestations_ok(t *testing.T) {
|
||||
if params.BeaconConfig().EpochLength != 64 {
|
||||
t.Fatalf("EpochLength should be 64 for these tests to pass")
|
||||
t.Errorf("EpochLength should be 64 for these tests to pass")
|
||||
}
|
||||
|
||||
var pendingAttestations []*pb.PendingAttestationRecord
|
||||
@ -63,7 +63,7 @@ func TestEpochAttestations_ok(t *testing.T) {
|
||||
|
||||
func TestEpochBoundaryAttestations(t *testing.T) {
|
||||
if params.BeaconConfig().EpochLength != 64 {
|
||||
t.Fatalf("EpochLength should be 64 for these tests to pass")
|
||||
t.Errorf("EpochLength should be 64 for these tests to pass")
|
||||
}
|
||||
|
||||
epochAttestations := []*pb.PendingAttestationRecord{
|
||||
|
Loading…
Reference in New Issue
Block a user