Globals: Explicitly pass const CChainParams& to UpdateTip()#7876
Globals: Explicitly pass const CChainParams& to UpdateTip()#7876jtimon wants to merge 1 commit intobitcoin:masterfrom
Conversation
|
utACK 145ae6e |
|
@laanwj well, the idea of #7829 is helping new people doing them. I did #7828 as a "canonical example" (in fact, I wanted to pass CPolicy at the same time, but ProcessMessage() has waited enough for CPolicy to exist...) and this one because it seems slightly more confusing (or could confuse someone trying to do it for DisconnectTip()). I wouldn't mind doing DisconnectTip() in this PR for that reason. Probably the less disruptive remaining ones are ConnectBlock(), CheckBlockHeader() and ContextualCheckBlockHeader() [I didn't put ContextualCheckBlock() because @morcos and I want to just destroy the function]. But these seem good exercises for #7829. Besides that, I must have tried to do CheckBlockHeader() like in 10 different PRs already (probably 5 of them did it before and 5 of them after the cursed consensus moveonly), but I've never tried to get someone else to do it. Perhaps this breaks the curse or something. |
|
@jtimon Well sure it helps reviewing to have small pull requests, but if it's just adding an argument to a function and passing it on that's hardly a risky refactor, nor controversial in any way.
ok Let's do that. |
|
Closing in favor of #7916 , which contains this same commit plus another one doing it for DisconnectTip() and InvalidateBlock() too. |
Part of #7829.