-
Notifications
You must be signed in to change notification settings - Fork 14
fix: don't cache recent transactions during syncing #602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe caching logic for the Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
DashSync/shared/Models/Transactions/Base/DSTransaction.m(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Mainnet Chain
- GitHub Check: Testnet E2E Tests
- GitHub Check: Objective-C Linter
- GitHub Check: Check Network
- GitHub Check: Testnet Chain
🔇 Additional comments (2)
DashSync/shared/Models/Transactions/Base/DSTransaction.m (2)
363-368: LGTM! Core logic correctly addresses the caching issue during sync.The conditional caching logic properly prevents caching of recent transactions during wallet syncing, which aligns with the PR objective. The 30-minute threshold provides a reasonable buffer for sync completion.
365-365: ```shell
#!/bin/bashLocate DSTransaction.m and display initializers and timestamp usage
FILE=$(fd --full-path DSTransaction.m | head -n1)
echo "DSTransaction file: $FILE"Show initializer methods
rg -n '^[+-] (instancetype)init' -C3 "$FILE"
Show where timestamp is set or referenced
rg -n 'timestamp' -C5 "$FILE"
</details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
pankcuf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Issue being fixed or feature implemented
Recent changes to transaction caching introduce a problem: if the transaction is cached during sync, its information can be invalid because the wallet is missing most of the required information.
What was done?
How Has This Been Tested?
QA
Breaking Changes
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit