Fix off-by-one error in determining the sync committee when POSTing sync committee messages through the REST API
This commit is contained in:
parent
5ef2ce4069
commit
542e645bed
|
@ -268,7 +268,7 @@ proc sendSyncCommitteeMessages*(node: BeaconNode,
|
||||||
|
|
||||||
for index, msg in msgs.pairs():
|
for index, msg in msgs.pairs():
|
||||||
if msg.validator_index < lenu64(state.data.validators):
|
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:
|
if msgPeriod == curPeriod:
|
||||||
resCur[msg.validator_index] = index
|
resCur[msg.validator_index] = index
|
||||||
elif msgPeriod == nextPeriod:
|
elif msgPeriod == nextPeriod:
|
||||||
|
|
Loading…
Reference in New Issue