diff --git a/cmd/blockchaincmd/deploy.go b/cmd/blockchaincmd/deploy.go index c3bb015f6..11e3239d4 100644 --- a/cmd/blockchaincmd/deploy.go +++ b/cmd/blockchaincmd/deploy.go @@ -686,7 +686,7 @@ func deployBlockchain(cmd *cobra.Command, args []string) error { return err } - clusterName, err := getClusterNameFromList() + clusterName, err := node.GetClusterNameFromList(app) if err != nil { return err } @@ -733,7 +733,7 @@ func deployBlockchain(cmd *cobra.Command, args []string) error { ); err != nil { return err } - ux.Logger.GreenCheckmarkToUser("Subnet is successfully converted into Subnet Only Validator") + ux.Logger.GreenCheckmarkToUser("L1 is successfully converted to sovereign blockchain") } else { if err := app.UpdateSidecarNetworks(&sidecar, network, subnetID, blockchainID, "", "", nil); err != nil { return err diff --git a/cmd/blockchaincmd/helpers.go b/cmd/blockchaincmd/helpers.go index 1e4b1f78b..98ada06c5 100644 --- a/cmd/blockchaincmd/helpers.go +++ b/cmd/blockchaincmd/helpers.go @@ -93,21 +93,3 @@ func UpdateKeychainWithSubnetControlKeys( } return nil } - -func getClusterNameFromList() (string, error) { - clusterNames, err := app.ListClusterNames() - if err != nil { - return "", err - } - if len(clusterNames) == 0 { - return "", fmt.Errorf("no Avalanche nodes found that can track the blockchain, please create Avalanche nodes first through `avalanche node create`") - } - clusterName, err := app.Prompt.CaptureList( - "Which cluster of Avalanche nodes would you like to use to track the blockchain?", - clusterNames, - ) - if err != nil { - return "", err - } - return clusterName, nil -} diff --git a/pkg/node/helper.go b/pkg/node/helper.go index b145fe7af..d97fec3f9 100644 --- a/pkg/node/helper.go +++ b/pkg/node/helper.go @@ -278,3 +278,21 @@ func WaitForHealthyCluster( time.Sleep(poolTime) } } + +func GetClusterNameFromList(app *application.Avalanche) (string, error) { + clusterNames, err := app.ListClusterNames() + if err != nil { + return "", err + } + if len(clusterNames) == 0 { + return "", fmt.Errorf("no Avalanche nodes found that can track the blockchain, please create Avalanche nodes first through `avalanche node create`") + } + clusterName, err := app.Prompt.CaptureList( + "Which cluster of Avalanche nodes would you like to use to track the blockchain?", + clusterNames, + ) + if err != nil { + return "", err + } + return clusterName, nil +}