File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -822,6 +822,11 @@ func deployBlockchain(cmd *cobra.Command, args []string) error {
822822 return nil
823823 }
824824
825+ // needs to first stop relayer so non sovereign subnets successfully restart
826+ if sidecar .TeleporterReady && ! icmSpec .SkipICMDeploy && ! icmSpec .SkipRelayerDeploy && network .Kind != models .Mainnet {
827+ _ = relayercmd .CallStop (nil , relayercmd.StopFlags {}, network )
828+ }
829+
825830 tracked := false
826831
827832 if sidecar .Sovereign {
@@ -954,7 +959,6 @@ func deployBlockchain(cmd *cobra.Command, args []string) error {
954959 }
955960 }
956961 if ! icmSpec .SkipRelayerDeploy && network .Kind != models .Mainnet {
957- _ = relayercmd .CallStop (nil , relayercmd.StopFlags {}, network )
958962 if network .Kind == models .Local && icmSpec .RelayerBinPath == "" && icmSpec .RelayerVersion == constants .DefaultRelayerVersion {
959963 if b , extraLocalNetworkData , err := localnet .GetExtraLocalNetworkData (app , "" ); err != nil {
960964 return err
Original file line number Diff line number Diff line change @@ -224,7 +224,24 @@ func TmpNetStop(
224224 }
225225 ctx , cancel := sdkutils .GetTimedContext (2 * time .Minute )
226226 defer cancel ()
227- return network .Stop (ctx )
227+ var errs []error
228+ // Initiate stop on all nodes
229+ for _ , node := range network .Nodes {
230+ node .URI = "" // avoid saving metrics snapshot
231+ if err := node .InitiateStop (ctx ); err != nil {
232+ errs = append (errs , fmt .Errorf ("failed to stop node %s: %w" , node .NodeID , err ))
233+ }
234+ }
235+ // Wait for stop to complete on all nodes
236+ for _ , node := range network .Nodes {
237+ if err := node .WaitForStopped (ctx ); err != nil {
238+ errs = append (errs , fmt .Errorf ("failed to wait for node %s to stop: %w" , node .NodeID , err ))
239+ }
240+ }
241+ if len (errs ) > 0 {
242+ return fmt .Errorf ("failed to stop network:\n %w" , errors .Join (errs ... ))
243+ }
244+ return nil
228245}
229246
230247// Indicates whether the given network has all, part, or none of its nodes running
You can’t perform that action at this time.
0 commit comments