Skip to content

Commit

Permalink
wait for healthy local
Browse files Browse the repository at this point in the history
sukantoraymond committed Oct 14, 2024
1 parent 23a76bc commit 8b7f331
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/nodecmd/local.go
Original file line number Diff line number Diff line change
@@ -4,10 +4,11 @@ package nodecmd

import (
"fmt"
"github.com/ava-labs/avalanche-cli/pkg/node"
"os"
"path/filepath"

"github.com/ava-labs/avalanche-cli/pkg/node"

"github.com/ava-labs/avalanche-cli/pkg/binutils"
"github.com/ava-labs/avalanche-cli/pkg/cobrautils"
"github.com/ava-labs/avalanche-cli/pkg/constants"
@@ -18,10 +19,7 @@ import (
"github.com/ava-labs/avalanche-cli/pkg/utils"
"github.com/ava-labs/avalanche-cli/pkg/ux"
"github.com/ava-labs/avalanche-network-runner/client"
anrutils "github.com/ava-labs/avalanche-network-runner/utils"
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/utils/logging"
"github.com/ava-labs/avalanchego/utils/set"
"github.com/spf13/cobra"
)

4 changes: 4 additions & 0 deletions pkg/node/sync.go
Original file line number Diff line number Diff line change
@@ -299,6 +299,10 @@ func TrackSubnetWithLocalMachine(app *application.Avalanche, clusterName, blockc
}
publicEndpoints = append(publicEndpoints, nodeInfo.Uri)
}
_, err = cli.WaitForHealthy(ctx)
if err != nil {
return err
}
networkInfo := sc.Networks[network.Name()]
rpcEndpoints := set.Of(networkInfo.RPCEndpoints...)
wsEndpoints := set.Of(networkInfo.WSEndpoints...)

0 comments on commit 8b7f331

Please sign in to comment.