Skip to content

Conversation

gtsui
Copy link
Contributor

@gtsui gtsui commented Oct 25, 2016

This is a continuation of #7829 by @jtimon

Explicitly pass CChainParams& to LoadBlockIndexDB() and LoadBlockIndex() and removed the Params() global call

@jtimon
Copy link
Contributor

jtimon commented Oct 25, 2016

Hi @gtsui welcome to the project!
Please tell me if you have any problems with this or other related PRs and I will try to help you
Everything seems perfectly correct with this PR.

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&.
I hope that's not a blocker for this, but if it is, it should be easy for you to rebase and adapt it that change is merged.

@laanwj
Copy link
Member

laanwj commented Oct 28, 2016

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.

@TheBlueMatt
Copy link
Contributor

utACK d0b01f3

{
const CChainParams& chainparams = Params();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is Params() anyway?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laanwj laanwj merged commit d0b01f3 into bitcoin:master Nov 2, 2016
laanwj added a commit that referenced this pull request Nov 2, 2016
…kIndexDB()

d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
codablock pushed a commit to codablock/dash that referenced this pull request Jan 13, 2018
…oadBlockIndexDB()

d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…oadBlockIndexDB()

d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 15, 2019
…oadBlockIndexDB()

d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 15, 2019
…oadBlockIndexDB()

d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() 
(Geoffrey Tsui)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants