Skip to content

Commit

Permalink
Merge branch 'andrius/fupdate-feeds-query-fix' into 'main'
Browse files Browse the repository at this point in the history
Indexer client: widen query window for FastUpdateFeedsSubmitted

See merge request flarenetwork/ftso-scaling!142
  • Loading branch information
adg-flare committed Oct 22, 2024
2 parents 4913b99 + d2ff526 commit c31fd3a
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
Expand Up @@ -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) {
Expand Down

0 comments on commit c31fd3a

Please sign in to comment.