@@ -426,11 +426,11 @@ func CreateSignatureAggregatorInstance(app *application.Avalanche, subnetIDStr s
426426 }
427427
428428 config := CreateSignatureAggregatorConfig (subnetIDStr , network .Endpoint , extraAggregatorPeers , apiPort , metricsPort )
429- configPath := filepath .Join (app .GetLocalSignatureAggregatorRunPath (network .Kind ), "config.json" )
429+ configPath := filepath .Join (app .GetSignatureAggregatorRunDir (network .Kind ), "config.json" )
430430 if err := WriteSignatureAggregatorConfig (config , configPath ); err != nil {
431431 return fmt .Errorf ("failed to write signature aggregator config: %w" , err )
432432 }
433- logPath := filepath .Join (app .GetLocalSignatureAggregatorRunPath (network .Kind ), "signature-aggregator.log" )
433+ logPath := filepath .Join (app .GetSignatureAggregatorRunDir (network .Kind ), "signature-aggregator.log" )
434434 signatureAggregatorEndpoint := fmt .Sprintf ("http://localhost:%d/aggregate-signatures" , apiPort )
435435 fmt .Printf ("signatureAggregatorEndpoint %s \n " , signatureAggregatorEndpoint )
436436 pid , err := StartSignatureAggregator (app , network , configPath , logPath , aggregatorLogger , version , signatureAggregatorEndpoint )
@@ -468,7 +468,6 @@ func saveSignatureAggregatorFile(runFilePath string, pid, apiPort, metricsPort i
468468 if err != nil {
469469 return err
470470 }
471- fmt .Printf ("saveSignatureAggregatorFile %s \n " , filepath .Dir (runFilePath ))
472471 if err := os .MkdirAll (filepath .Dir (runFilePath ), constants .DefaultPerms755 ); err != nil {
473472 return err
474473 }
@@ -527,6 +526,7 @@ func stopSignatureAggregator(app *application.Avalanche, network models.Network)
527526// It reads the run file to get the current ports and version, kills the existing process,
528527// and starts a new one with the updated config.
529528func restartSignatureAggregator (app * application.Avalanche , network models.Network , configPath string , logger logging.Logger ) error {
529+ fmt .Printf ("we restartSignatureAggregator \n " )
530530 // Stop the existing signature aggregator
531531 if err := stopSignatureAggregator (app , network ); err != nil {
532532 return fmt .Errorf ("failed to stop signature aggregator: %w" , err )
@@ -540,7 +540,7 @@ func restartSignatureAggregator(app *application.Avalanche, network models.Netwo
540540
541541 // Restart signature aggregator with updated config
542542 runFilePath := app .GetLocalSignatureAggregatorRunPath (network .Kind )
543- logPath := filepath .Join (app .GetLocalSignatureAggregatorRunPath (network .Kind ), "signature-aggregator.log" )
543+ logPath := filepath .Join (app .GetSignatureAggregatorRunDir (network .Kind ), "signature-aggregator.log" )
544544 signatureAggregatorEndpoint := fmt .Sprintf ("http://localhost:%d/aggregate-signatures" , runFile .APIPort )
545545 pid , err := StartSignatureAggregator (app , network , configPath , logPath , logger , runFile .Version , signatureAggregatorEndpoint )
546546 if err != nil {
@@ -555,7 +555,7 @@ func restartSignatureAggregator(app *application.Avalanche, network models.Netwo
555555// If new peers are found, it updates the config and restarts the signature aggregator.
556556func UpdateSignatureAggregatorPeers (app * application.Avalanche , network models.Network , extraAggregatorPeers []info.Peer , logger logging.Logger ) error {
557557 // Get the config path
558- configPath := filepath .Join (app .GetLocalSignatureAggregatorRunPath (network .Kind ), "config.json" )
558+ configPath := filepath .Join (app .GetSignatureAggregatorRunDir (network .Kind ), "config.json" )
559559
560560 // Read existing config
561561 existingConfig , err := readExistingConfig (configPath )
0 commit comments