Skip to content

cycle based data sync validation feature#6

Merged
jairajdev merged 2 commits intodevfrom
feat/cycle-based-data-sync
Nov 17, 2025
Merged

cycle based data sync validation feature#6
jairajdev merged 2 commits intodevfrom
feat/cycle-based-data-sync

Conversation

@jairajdev
Copy link
Contributor

No description provided.

- Implement SyncTracker interface for tracking lastSavedCycle across data types
- Add cycleTracker, receiptTracker, and originalTxTracker instances
- Create sync validation functions with 1-cycle buffer logic ( current cycle - 2 )
- Auto-initialize trackers on first use to prevent syncing from cycle 0
- Integrate checkAndSyncDataByCycle into insertOrUpdateCycle
- Sync runs in background on new cycle data from websocket distributor
- Remove shouldSyncData helper and inline logic into each validateAndSync function
- Move tracker updates outside try-catch to ensure progression on errors
- Add isInSync optimization in validateAndSyncCycles to skip redundant downloads
- Improve error logging with newCycle and targetCycle context
- Log unmatched cycles array for better debugging visibility
- Rename currentCycle parameter to newCycle for consistency
@jairajdev jairajdev merged commit ebb2025 into dev Nov 17, 2025
@jairajdev jairajdev deleted the feat/cycle-based-data-sync branch November 17, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant