Skip to content

Commit

Permalink
Indexer client: widen query window for FastUpdateFeedsSubmitted
Browse files Browse the repository at this point in the history
adg-flare committed Oct 22, 2024
1 parent 4913b99 commit d2ff526
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/ftso-core/src/IndexerClientForRewarding.ts
Original file line number Diff line number Diff line change
@@ -106,7 +106,9 @@ export class IndexerClientForRewarding extends IndexerClient {
endVotingRoundId: number
): Promise<IndexerResponse<FastUpdateFeedsSubmitted[][]>> {
const startTime = EPOCH_SETTINGS().votingEpochStartSec(startVotingRoundId);
const endTime = EPOCH_SETTINGS().votingEpochStartSec(endVotingRoundId + 1) - 1;
// Adding extra round as buffer to ensure all events are captured, as there are cases where FastUpdateFeedsSubmitted events are emitted slightly outside the voting epoch.
// This is safe to do as we only process events containing votingRoundId within the range.
const endTime = EPOCH_SETTINGS().votingEpochStartSec(endVotingRoundId + 2);
const eventName = FastUpdateFeedsSubmitted.eventName;
const status = await this.ensureEventRange(startTime, endTime);
if (status !== BlockAssuranceResult.OK) {

0 comments on commit d2ff526

Please sign in to comment.