Fix off-by-one error in determining the sync committee when POSTing sync committee messages through the REST API

This commit is contained in:
Zahary Karadjov 2022-03-07 17:24:21 +02:00
parent 5ef2ce4069
commit 542e645bed
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ proc sendSyncCommitteeMessages*(node: BeaconNode,
for index, msg in msgs.pairs():
if msg.validator_index < lenu64(state.data.validators):
let msgPeriod = sync_committee_period(msg.slot)
let msgPeriod = sync_committee_period(msg.slot + 1)
if msgPeriod == curPeriod:
resCur[msg.validator_index] = index
elif msgPeriod == nextPeriod: