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.
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)