2021-07-19 18:26:39 +00:00
|
|
|
package v1_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-01-18 08:19:20 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state"
|
2022-02-11 06:48:29 +00:00
|
|
|
testtmpl "github.com/prysmaticlabs/prysm/beacon-chain/state/testing"
|
2021-07-19 18:26:39 +00:00
|
|
|
v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/v1"
|
2021-07-29 21:45:17 +00:00
|
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
2021-07-19 18:26:39 +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 v1.InitializeFromProtoUnsafe(ðpb.BeaconState{
|
|
|
|
Validators: nil,
|
|
|
|
})
|
2021-07-19 18:26:39 +00:00
|
|
|
})
|
|
|
|
}
|