From 41384e9cbde5344fdcbf58d0529551a6f0ed786e Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 18 Jul 2023 18:26:27 +0400 Subject: [PATCH] sidechain/deploy: Do not repeat already failed actions within one block Some actions of committee group distribution routine are similar for all domains, so it's redundant to repeat same failed ops for other domains. Signed-off-by: Leonard Lyubich --- pkg/morph/deploy/group.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/morph/deploy/group.go b/pkg/morph/deploy/group.go index ed1739628ba..0e0ca1a07d2 100644 --- a/pkg/morph/deploy/group.go +++ b/pkg/morph/deploy/group.go @@ -175,7 +175,7 @@ func initShareCommitteeGroupKeyAsLeaderTick(ctx context.Context, prm initCommitt } else { l.Error("failed to send transaction registering domain in the NNS, will try again later", zap.Error(err)) } - continue + return } l.Info("transaction registering domain in the NNS has been successfully sent, will wait for the outcome", @@ -186,7 +186,7 @@ func initShareCommitteeGroupKeyAsLeaderTick(ctx context.Context, prm initCommitt continue } else if !errors.Is(err, errMissingDomainRecord) { l.Error("failed to lookup NNS domain record, will try again later", zap.Error(err)) - continue + return } l.Info("missing record of the NNS domain, needed to be set") @@ -221,7 +221,7 @@ func initShareCommitteeGroupKeyAsLeaderTick(ctx context.Context, prm initCommitt } else { l.Error("failed to send transaction setting NNS domain record, will try again later", zap.Error(err)) } - continue + return } l.Info("transaction setting NNS domain record has been successfully sent, will wait for the outcome",