Skip to content

Commit 542e645

Browse files
committed
Fix off-by-one error in determining the sync committee when POSTing sync committee messages through the REST API
1 parent 5ef2ce4 commit 542e645

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beacon_chain/validators/validator_duties.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ proc sendSyncCommitteeMessages*(node: BeaconNode,
268268

269269
for index, msg in msgs.pairs():
270270
if msg.validator_index < lenu64(state.data.validators):
271-
let msgPeriod = sync_committee_period(msg.slot)
271+
let msgPeriod = sync_committee_period(msg.slot + 1)
272272
if msgPeriod == curPeriod:
273273
resCur[msg.validator_index] = index
274274
elif msgPeriod == nextPeriod:

0 commit comments

Comments
 (0)