From a48035b6f71fc0edad2bb9eb9475eb15c4e13ecb Mon Sep 17 00:00:00 2001 From: ron Date: Tue, 8 Oct 2024 14:14:27 +0800 Subject: [PATCH] Fix find checkpoint --- relayer/relays/beacon/header/header.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relayer/relays/beacon/header/header.go b/relayer/relays/beacon/header/header.go index 81735284e2..1eee23c388 100644 --- a/relayer/relays/beacon/header/header.go +++ b/relayer/relays/beacon/header/header.go @@ -555,7 +555,7 @@ func (h *Header) findLatestCheckPoint(slot uint64) (state.FinalizedHeader, error endIndex := startIndex + 1 syncCommitteePeriod := h.protocol.Settings.SlotsInEpoch * h.protocol.Settings.EpochsPerSyncCommitteePeriod - totalStates := syncCommitteePeriod * h.protocol.HeaderRedundancy // Total size of the circular buffer, + totalStates := h.protocol.Settings.EpochsPerSyncCommitteePeriod * h.protocol.HeaderRedundancy // Total size of the circular buffer, // https://github.com/paritytech/polkadot-sdk/blob/master/bridges/snowbridge/pallets/ethereum-client/src/lib.rs#L75 for index := startIndex; index != endIndex; index = (index - 1 + totalStates) % totalStates { beaconRoot, err := h.writer.GetFinalizedBeaconRootByIndex(uint32(index))