Dependencies (and list of things TODO):
- [ ] Globals: Explicitly pass const CChainParams& to UpdateTip() #7876
- [ ] Globals: DisconnectTip() requires the full CChainParams, not just Consensus::Params (depends on #7876)
- [ ] Make functions in validation.cpp static: #10227
-
Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() #7828
-
Explicitly pass CChainParams& to DisconnectTip() #7916 (does UpdateTip() DisconnectTip() and InvalidateBlock() at once)
-
Consensus: Decouple from chainparams.o and timedata.o #8077 [CheckBlockHeader, CheckBlock, ContextualCheckBlockHeader]
-
Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock #8413
-
Chainparams: Trivial: In AppInit2(), s/Params()/chainparams/ #8975
-
Trivial: Explicitly pass const CChainParams& to LoadBlockIndexDB() #9013
-
pass Consensus::Params& to functions in validation.cpp and make them static #10201
-
Globals: Pass Consensus::Params through CBlockTreeDB::LoadBlockIndexGuts() #9176 [0.13-chainparams-loadblockindexguts]
-
ConnectBlock()
-
FlushStateToDisk()
-
LoadMempool()
-
ProcessMessages() [not trivial]
-
SendMessages() [not trivial]
-
IsInitialBlockDownload() (disruptive)
-
Explicitly pass const CChainParams and Consensus::Params() in net.cpp (several functions)
“I opened this PR so that newcomers to the Bitcoin Core project could make simple changes to get familiar with contributing to Bitcoin Core. I have marked a number of TODO comments in the source code of this pull request. The changes listed here are not critical to the project but they are good introductory material. Each TODO is relatively simple, and more experienced developers are busy doing other tasks, making this an excellent chance for you to get feedback from me on basic contributions to Bitcoin Core. Hopefully this will help you streamline submissions to Core, please let me know how I can help.”
We can slowly turn the global pCurrentParams (hidden behind the function “Params()” for no good reason) into a CChainParams& parameter wherever is needed. This will take very long and I won’t be done by one single person. I’m pretty convinced that everybody agrees with this in general, so it should be relatively easy to get your based-on-this-PR merged. But I’m here, just ask.
You may be interested in this PR because:
- You are a developer, but you’re not familiar with git (or mercurial or similar), or you are intimidated about contributing to Bitcoin Core for whatever reason. I’ve done it. I’m trying to be here to show you you can too (without coma between 2 “yous”, if that’s allowed in enligsh).
- You are interested in my PROMISES*
- You just want to get one commit merged in github/bitcoin/bitcoin because you have an interview in the evening, I don’t care if you help me.
- rustyrussell told me nobody would ever read the forth point in a numbered list.
What would you have to do:
Simple: force me to remove TODO lines from this PR, one function at a time if possible.
PROMISES:
If you force me to replace any TODO line in this PR, and you’re open for nits in your own PR, I promise:
- I will review your PR and nack soon or nit until I can give a no-test-needed ACK (or an utACK [the former is better]).
- Please ping me on this PR, or on your own for anything related to this.
Once a month (at least):
- collect nits and solve them
- I will incorporate open PRs that remove TODOs from this mission.
- I will rebase anything that’s needed if the maintainer can’t do it from my base to my-next-month-base, every month
- I will try to attract more review to your PR.
- You will just need patience some times. @laanwj please, take this as an open issue that is going to last for long. Just with code [but, still, never to merge no matter how much I change it].