2021-11-22 17:37:55 +00:00
|
|
|
package v3
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-02-08 09:30:06 +00:00
|
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
2021-11-22 17:37:55 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/testing/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestBeaconState_CurrentEpochAttestations(t *testing.T) {
|
2022-02-08 09:30:06 +00:00
|
|
|
s, err := InitializeFromProtoUnsafe(ðpb.BeaconStateBellatrix{})
|
|
|
|
require.NoError(t, err)
|
|
|
|
_, err = s.CurrentEpochAttestations()
|
2022-01-10 16:47:30 +00:00
|
|
|
require.ErrorContains(t, "CurrentEpochAttestations is not supported for version Bellatrix beacon state", err)
|
2021-11-22 17:37:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestBeaconState_PreviousEpochAttestations(t *testing.T) {
|
2022-02-08 09:30:06 +00:00
|
|
|
s, err := InitializeFromProtoUnsafe(ðpb.BeaconStateBellatrix{})
|
|
|
|
require.NoError(t, err)
|
|
|
|
_, err = s.PreviousEpochAttestations()
|
2022-01-10 16:47:30 +00:00
|
|
|
require.ErrorContains(t, "PreviousEpochAttestations is not supported for version Bellatrix beacon state", err)
|
2021-11-22 17:37:55 +00:00
|
|
|
}
|