New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch testing framework from MAIN to new UNITTEST network #4845
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ class CBaseChainParams | |
MAIN, | ||
TESTNET, | ||
REGTEST, | ||
UNITTEST, | ||
|
||
MAX_NETWORK_TYPES | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2330,6 +2330,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex | |
nHeight = pindexPrev->nHeight+1; | ||
|
||
// Check proof of work | ||
if (!Params().SkipProofOfWorkCheck()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks weird, is it missing an indentation below or some brackets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or just fold it into the expression with && There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's missing indentation below. |
||
if (block.nBits != GetNextWorkRequired(pindexPrev, &block)) | ||
return state.DoS(100, error("AcceptBlock() : incorrect proof of work"), | ||
REJECT_INVALID, "bad-diffbits"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to s/Reg/Unit/ here to keep things distinct. Regtest is for programs that drive the app externally over the wire, unit tests is for, well, unit tests.