Skip to content

Commit 0de5ada

Browse files
committed
fix: don't run validation for empty fdc rounds
1 parent 68979b5 commit 0de5ada

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

observer/validation/fdc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def check_submit_2(
5858
# - submit2 exists but bit vote length doesn't match number of requests -> error
5959
# - submit2 exists but bit vote does not dominate consensus bit vote -> error
6060

61+
if not round.fdc.consensus_bitvote:
62+
return []
63+
6164
# TODO:(matej) move this to py-flare-common
6265
bp = ByteParser(
6366
sorted(round.fdc.consensus_bitvote.items(), key=lambda x: -x[1])[0][0]
@@ -133,6 +136,9 @@ def check_submit_signatures(
133136
# - submitSignature was sent after the deadline -> warning
134137
# - signature doesn't match finalization -> error
135138

139+
if not round.fdc.consensus_bitvote:
140+
return []
141+
136142
if submit_2 is None and submit_signatures is None:
137143
issues.append(
138144
mb.build(MessageLevel.ERROR, "no submitSignatures transaction"),

0 commit comments

Comments
 (0)