Skip to content

Commit

Permalink
[CORE] Check header version
Browse files Browse the repository at this point in the history
  • Loading branch information
THETCR committed Aug 21, 2019
1 parent 0c70103 commit 74e39a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4054,7 +4054,7 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
REJECT_INVALID, "high-hash");

// Version 4 header must be used after Params().NEW_PROTOCOLS_STARTHEIGHT(). And never before.
if (chainActive.Height() >= Params().NEW_PROTOCOLS_STARTHEIGHT()) {
if (chainActive.Height() + 1 >= Params().NEW_PROTOCOLS_STARTHEIGHT()) {
if(block.nVersion < Params().Zerocoin_HeaderVersion() && Params().NetworkID() != CBaseChainParams::REGTEST)
return state.DoS(50, error("CheckBlockHeader() : block version must be above 7 after ZerocoinStartHeight"),
REJECT_INVALID, "block-version");
Expand Down

0 comments on commit 74e39a6

Please sign in to comment.