github.com/MetalBlockchain/metalgo@v1.11.9/genesis/bootstrappers_test.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package genesis
     5  
     6  import (
     7  	"testing"
     8  
     9  	"github.com/stretchr/testify/require"
    10  
    11  	"github.com/MetalBlockchain/metalgo/utils/constants"
    12  )
    13  
    14  func TestSampleBootstrappers(t *testing.T) {
    15  	require := require.New(t)
    16  
    17  	for networkID, networkName := range constants.NetworkIDToNetworkName {
    18  		length := 10
    19  		bootstrappers := SampleBootstrappers(networkID, length)
    20  		t.Logf("%s bootstrappers: %+v", networkName, bootstrappers)
    21  
    22  		if networkID == constants.MainnetID || networkID == constants.TahoeID {
    23  			require.Len(bootstrappers, length)
    24  		}
    25  	}
    26  }