Skip to content

Commit

Permalink
Merge pull request #2473 from OffchainLabs/fix-pending-validations-me…
Browse files Browse the repository at this point in the history
…tric

Fix validator pending validations metric
  • Loading branch information
PlasmaPower authored Jul 10, 2024
2 parents 50a4f1d + 5963d7e commit aae7995
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 aae7995

Please sign in to comment.