Moves both functions closer to being pure.
I want this to improve my fuzzing results.
Moves both functions closer to being pure.
I want this to improve my fuzzing results.
Moves both functions closer to being pure.
Concept ACK.
utACK b3a9f85
utACK
utACK b3a9f8592952569da50c77b277f7ab7146b6cbea
utACK b3a9f85
utACK https://github.com/bitcoin/bitcoin/commit/b3a9f8592952569da50c77b277f7ab7146b6cbea
(maybe this could be taken even further, I'm not sure what you're rationale is to stop at e.g. ConnectBlock but not TestBlockValidity, but it's a good start)
3211 | @@ -3212,20 +3212,20 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne 3212 | return true; 3213 | } 3214 | 3215 | -bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW) 3216 | +bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, int64_t nAdjustedTime, bool fCheckPOW)
If it's not too late for bikeshedding...all the times I've tried to do this, I've named the variable nTime instead of nAdjustedTime. Not important, but would make https://github.com/jtimon/bitcoin/commits/jt easier to rebase to 0.13...
except... it's actually the adjusted time
Whatever...no big deal
IMO the commit will remain clean and obviously correct. It's currently +11 -11, and I predict it to become +15 -13 or less. Do you want me to provide a fixup! commit for you to decide whether to squash it or not?
If we do the thing in 2 steps, it will be about 2 commits +11 -11. I guess I'll open competing PR then...
#8077 has been merged.