mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
5507558678
* Refactor to unify state getters block tests * Add reference tests to Altair and Bellatrix versions ofthe state * Fix function naming convetion * Add state-native/v2/references_test.go and state-native/v3/references_test.go * Gazelle run Co-authored-by: Radosław Kapka <rkapka@wp.pl>
19 lines
566 B
Go
19 lines
566 B
Go
package v3_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state"
|
|
testtmpl "github.com/prysmaticlabs/prysm/beacon-chain/state/testing"
|
|
v3 "github.com/prysmaticlabs/prysm/beacon-chain/state/v3"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
)
|
|
|
|
func TestBeaconState_ValidatorAtIndexReadOnly_HandlesNilSlice(t *testing.T) {
|
|
testtmpl.VerifyBeaconStateValidatorAtIndexReadOnlyHandlesNilSlice(t, func() (state.BeaconState, error) {
|
|
return v3.InitializeFromProtoUnsafe(ðpb.BeaconStateBellatrix{
|
|
Validators: nil,
|
|
})
|
|
})
|
|
}
|