diff --git a/db/model/event.go b/db/model/event.go index 505c209..6e17d22 100644 --- a/db/model/event.go +++ b/db/model/event.go @@ -44,6 +44,7 @@ const ( Attested // Event has been submitted for tx Duplicated DuplicatedSlash + VerificationFailed // Event cannot be verified due to at least 1 endpoint not responding ) type VerifyResult int diff --git a/verifier/hash_verifier.go b/verifier/hash_verifier.go index 986e3f1..69de9b2 100644 --- a/verifier/hash_verifier.go +++ b/verifier/hash_verifier.go @@ -154,7 +154,7 @@ func (v *Verifier) verifyForSingleEvent(event *model.Event) error { }, retry.Context(context.Background()), common.RtyAttem, common.RtyDelay, common.RtyErr) if err != nil { - err = v.dataProvider.UpdateEventStatusVerifyResult(event.ChallengeId, model.Verified, model.Unknown) + err = v.dataProvider.UpdateEventStatus(event.ChallengeId, model.VerificationFailed) v.metricService.IncVerifiedChallenges() v.metricService.IncChallengeFailed() if err != nil { @@ -177,7 +177,7 @@ func (v *Verifier) verifyForSingleEvent(event *model.Event) error { return err }, retry.Context(context.Background()), common.RtyAttem, common.RtyDelay, common.RtyErr) if err != nil { - err = v.dataProvider.UpdateEventStatusVerifyResult(event.ChallengeId, model.Verified, model.Unknown) + err = v.dataProvider.UpdateEventStatus(event.ChallengeId, model.VerificationFailed) v.metricService.IncVerifiedChallenges() v.metricService.IncChallengeFailed() if err != nil {