From 542e645bedec7702a973dc5cdaae87175e353009 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Mon, 7 Mar 2022 17:24:21 +0200 Subject: [PATCH] Fix off-by-one error in determining the sync committee when POSTing sync committee messages through the REST API --- beacon_chain/validators/validator_duties.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/validators/validator_duties.nim b/beacon_chain/validators/validator_duties.nim index 0ee548267..1073fff9d 100644 --- a/beacon_chain/validators/validator_duties.nim +++ b/beacon_chain/validators/validator_duties.nim @@ -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: