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>
33 lines
564 B
Go
33 lines
564 B
Go
package genesis_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/state/genesis"
|
|
"github.com/prysmaticlabs/prysm/v5/config/params"
|
|
)
|
|
|
|
func TestGenesisState(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
}{
|
|
{
|
|
name: params.MainnetName,
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
st, err := genesis.State(tt.name)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if st == nil {
|
|
t.Fatal("nil state")
|
|
}
|
|
if st.NumValidators() <= 0 {
|
|
t.Error("No validators present in state")
|
|
}
|
|
})
|
|
}
|
|
}
|