2021-09-23 01:10:25 +00:00
|
|
|
package v2_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-08-16 12:20:13 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/state"
|
|
|
|
testtmpl "github.com/prysmaticlabs/prysm/v3/beacon-chain/state/testing"
|
|
|
|
v2 "github.com/prysmaticlabs/prysm/v3/beacon-chain/state/v2"
|
|
|
|
ethpb "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1"
|
2021-09-23 01:10:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestBeaconState_ValidatorAtIndexReadOnly_HandlesNilSlice(t *testing.T) {
|
2022-03-15 18:32:09 +00:00
|
|
|
testtmpl.VerifyBeaconStateValidatorAtIndexReadOnlyHandlesNilSlice(t, func() (state.BeaconState, error) {
|
2022-02-11 06:48:29 +00:00
|
|
|
return v2.InitializeFromProtoUnsafe(ðpb.BeaconStateAltair{
|
|
|
|
Validators: nil,
|
|
|
|
})
|
2021-09-23 01:10:25 +00:00
|
|
|
})
|
|
|
|
}
|