Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added a new status VerificationFailed #95

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions db/model/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions verifier/hash_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down