Skip to content

Commit

Permalink
fix timeouts for sa
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Feb 24, 2025
1 parent 394ce8e commit b648757
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 @@ -544,6 +544,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 @@ -317,6 +317,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 @@ -356,6 +358,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 @@ -585,6 +585,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 b648757

Please sign in to comment.