-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Trivial: Explicitly pass const CChainParams& to LoadBlockIndexDB() #9013
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
Hi @gtsui welcome to the project! utACK (stands for "untested ACK", see https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#peer-review ) The only thing that I have to add is that there was some recent talk about replacing the checkpoints as a mechanism for guessing the verification progress. If that change were made, then LoadBlockIndexDB() and LoadBlockIndex() could take only a const Consensus::Params& instead of the full const CChainParams&. |
utACK d0b01f3 Sure, in the future this could probably be reduced in scope to a ConsensusParams, but passing the entire chainparams doesn't hurt and changing the parameter would be a low-priority change afterward. |
utACK d0b01f3 |
{ | ||
const CChainParams& chainparams = Params(); |
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.
What is Params() anyway?
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.
…kIndexDB() d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
…oadBlockIndexDB() d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
…oadBlockIndexDB() d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
…oadBlockIndexDB() d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
…oadBlockIndexDB() d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
This is a continuation of #7829 by @jtimon
Explicitly pass CChainParams& to LoadBlockIndexDB() and LoadBlockIndex() and removed the Params() global call