Skip to content

Commit

Permalink
Fix validator pending validations metric
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Jul 10, 2024
1 parent de3dcff commit 5e3bb7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion staker/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ validationsLoop:
v.possiblyFatal(errors.New("failed to set SendingValidation status"))
}
validatorPendingValidationsGauge.Inc(1)
defer validatorPendingValidationsGauge.Dec(1)
var runs []validator.ValidationRun
for _, moduleRoot := range wasmRoots {
run := v.chosenValidator[moduleRoot].Launch(input, moduleRoot)
Expand All @@ -826,6 +825,7 @@ validationsLoop:
validationStatus.Runs = runs
validationStatus.Cancel = cancel
v.LaunchUntrackedThread(func() {
defer validatorPendingValidationsGauge.Dec(1)
defer cancel()
replaced = validationStatus.replaceStatus(SendingValidation, ValidationSent)
if !replaced {
Expand Down

0 comments on commit 5e3bb7b

Please sign in to comment.