Skip to content

Commit

Permalink
Fix find checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Oct 8, 2024
1 parent bd3961d commit a48035b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion relayer/relays/beacon/header/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a48035b

Please sign in to comment.