-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: avoid extra work in GetListForBlockInternal before dip0003 activation #6527
fix: avoid extra work in GetListForBlockInternal before dip0003 activation #6527
Conversation
…ation Less evodb reads, no `initial snapshot` spam in logs
WalkthroughThe pull request introduces a modification to the The modification alters the method's control flow by introducing an early exit condition based on the deployment status. The existing lock assertion ( 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (2)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
CDeterministicMNList snapshot; | ||
|
||
if (!DeploymentActiveAt(*pindex, Params().GetConsensus(), Consensus::DEPLOYMENT_DIP0003)) { |
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.
should a similar check to be added also inside while(true)
below?
pindex = pindex->pprev;
if (dip0003 is not activated) -> no need to read snapshot
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.
As soon as dip3 is active we enter that loop and write/cache the initial snapshot. You can never go below this snapshot in that loop so we can be pretty sure dip3 is always active there.
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.
LGTM 82684ea
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.
utACK 82684ea
Issue being fixed or feature implemented
There could be no DMN before DIP0003, so let's bail out early. The result is less evodb reads and no
initial snapshot
spam in logs when syncing from scratch.What was done?
How Has This Been Tested?
Breaking Changes
n/a
Checklist: