We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a24bc84 commit d41f35bCopy full SHA for d41f35b
Blockchain/Sources/Blockchain/Types/ExtrinsicGuarantees.swift
@@ -76,6 +76,7 @@ extension ExtrinsicGuarantees: Validate {
76
case invalidCoreIndex
77
case invalidValidatorIndex
78
case credentialsNotSorted
79
+ case invalidCredentialCount
80
case duplicatedWorkPackageHash
81
}
82
@@ -91,6 +92,12 @@ extension ExtrinsicGuarantees: Validate {
91
92
throw Error.invalidCoreIndex
93
94
95
+ do {
96
+ try guarantee.credential.validateThrowing()
97
+ } catch {
98
+ throw Error.invalidCredentialCount
99
+ }
100
+
101
guard guarantee.credential.isSortedAndUnique(by: { $0.index < $1.index }) else {
102
throw Error.credentialsNotSorted
103
0 commit comments