Skip to content

Commit

Permalink
use the enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed Nov 22, 2023
1 parent c83b582 commit 76b9b3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions protocol/chainlib/base_chain_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ func getServiceApis(spec spectypes.Spec, rpcInterface string) (retServerApis map
Value: parseValue.ExpectedValue,
LatestDistance: parseValue.LatestDistance,
VerificationKey: verificationKey,
Severity: verification.Severity,
}

if extensionVerifications, ok := verifications[verificationKey]; !ok {
Expand Down
5 changes: 4 additions & 1 deletion protocol/chainlib/chain_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ func (cf *ChainFetcher) Validate(ctx context.Context) error {
}
}
if err != nil {
return utils.LavaFormatError("invalid Verification on provider startup", err, utils.Attribute{Key: "Addons", Value: addons}, utils.Attribute{Key: "verification", Value: verification.Name})
err := utils.LavaFormatError("invalid Verification on provider startup", err, utils.Attribute{Key: "Addons", Value: addons}, utils.Attribute{Key: "verification", Value: verification.Name})
if verification.Severity == spectypes.Verification_Fail {
return err
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions protocol/chainlib/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type VerificationContainer struct {
ParseDirective spectypes.ParseDirective
Value string
LatestDistance uint64
Severity spectypes.Verification_VerificationSeverity
VerificationKey
}

Expand Down

0 comments on commit 76b9b3f

Please sign in to comment.