Skip to content

Commit e2f2876

Browse files
authored
Fixes DKG Nil Keys Edge case (#274)
* dkg nil test * add comment about test state
1 parent d123d87 commit e2f2876

File tree

3 files changed

+45
-11
lines changed

3 files changed

+45
-11
lines changed

contracts/epochs/FlowDKG.cdc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,14 @@ pub contract FlowDKG {
399399

400400
for submission in self.uniqueFinalSubmissions {
401401
if self.uniqueFinalSubmissionCount[index]! > self.getSafeSuccessThreshold() {
402+
var foundNil: Bool = false
402403
for key in submission {
403404
if key == nil {
404-
return nil
405+
foundNil = true
406+
break
405407
}
406408
}
409+
if foundNil { continue }
407410
return submission
408411
}
409412
index = index + 1

0 commit comments

Comments
 (0)