Skip to content

Commit

Permalink
fix timeouts for sa (#2630)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero authored Feb 24, 2025
1 parent 0cbb0dc commit 752b23c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/blockchaincmd/add_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ func CallAddValidator(
}
}

aggregatorCtx, aggregatorCancel = sdkutils.GetTimedContext(constants.SignatureAggregatorTimeout)
defer aggregatorCancel()
if err := validatormanager.FinishValidatorRegistration(
aggregatorCtx,
app,
Expand Down
4 changes: 4 additions & 0 deletions cmd/blockchaincmd/remove_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ func removeValidatorSOV(
if !force {
return fmt.Errorf("validator %s is not eligible for rewards. Use --force flag to force removal", nodeID)
}
aggregatorCtx, aggregatorCancel = sdkutils.GetTimedContext(constants.SignatureAggregatorTimeout)
defer aggregatorCancel()
signedMessage, validationID, err = validatormanager.InitValidatorRemoval(
aggregatorCtx,
app,
Expand Down Expand Up @@ -357,6 +359,8 @@ func removeValidatorSOV(
}
}

aggregatorCtx, aggregatorCancel = sdkutils.GetTimedContext(constants.SignatureAggregatorTimeout)
defer aggregatorCancel()
if err := validatormanager.FinishValidatorRemoval(
aggregatorCtx,
app,
Expand Down
2 changes: 2 additions & 0 deletions cmd/nodecmd/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ func addAsValidator(network models.Network,
}
}

aggregatorCtx, aggregatorCancel = sdkutils.GetTimedContext(constants.SignatureAggregatorTimeout)
defer aggregatorCancel()
if err := validatormanager.FinishValidatorRegistration(
aggregatorCtx,
app,
Expand Down

0 comments on commit 752b23c

Please sign in to comment.