mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
5a66807989
* First take at updating everything to v5 * Patch gRPC gateway to use prysm v5 Fix patch * Update go ssz --------- Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
20 lines
491 B
Go
20 lines
491 B
Go
package testing
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/state"
|
|
"github.com/prysmaticlabs/prysm/v5/testing/assert"
|
|
"github.com/prysmaticlabs/prysm/v5/testing/require"
|
|
)
|
|
|
|
type getState func() (state.BeaconState, error)
|
|
|
|
func VerifyBeaconStateValidatorAtIndexReadOnlyHandlesNilSlice(t *testing.T, factory getState) {
|
|
st, err := factory()
|
|
require.NoError(t, err)
|
|
|
|
_, err = st.ValidatorAtIndexReadOnly(0)
|
|
assert.Equal(t, state.ErrNilValidatorsInState, err)
|
|
}
|