Skip to content

Commit

Permalink
zerocoin block header version on testnet 2
Browse files Browse the repository at this point in the history
  • Loading branch information
adeptio-project committed Jan 23, 2019
1 parent f7b126b commit 5678858
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/chainparams.cpp
Expand Up @@ -337,7 +337,7 @@ class CTestNetParams : public CMainParams
nMintRequiredConfirmations = 100; //the maximum amount of confirmations until accumulated in 19
nRequiredAccumulation = 1;
nDefaultSecurityLevel = 100; //full security level for accumulators
nZerocoinHeaderVersion = 5; //Block headers must be this version once zerocoin is active
nZerocoinHeaderVersion = 6; //Block headers must be this version once zerocoin is active
nZerocoinRequiredStakeDepth = 200; //The required confirmations for a zADE to be stakable

nBudget_Fee_Confirmations = 6; // Number of confirmations for the finalization fee
Expand Down
18 changes: 9 additions & 9 deletions src/main.cpp
Expand Up @@ -3766,15 +3766,15 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
REJECT_INVALID, "high-hash");

// Version 4 header must be used after Params().Zerocoin_StartHeight(). And never before.
if (block.GetBlockTime() > Params().Zerocoin_StartTime()) {
if(block.nVersion < Params().Zerocoin_HeaderVersion())
return state.DoS(50, error("CheckBlockHeader() : block version must be above 6 after ZerocoinStartHeight"),
REJECT_INVALID, "block-version");
} else {
if (block.nVersion >= Params().Zerocoin_HeaderVersion())
return state.DoS(50, error("CheckBlockHeader() : block version must be below 6 before ZerocoinStartHeight"),
REJECT_INVALID, "block-version");
}
// if (block.GetBlockTime() > Params().Zerocoin_StartTime()) {
// if(block.nVersion < Params().Zerocoin_HeaderVersion())
// return state.DoS(50, error("CheckBlockHeader() : block version must be above 6 after ZerocoinStartHeight"),
// REJECT_INVALID, "block-version");
// } else {
// if (block.nVersion >= Params().Zerocoin_HeaderVersion())
// return state.DoS(50, error("CheckBlockHeader() : block version must be below 6 before ZerocoinStartHeight"),
// REJECT_INVALID, "block-version");
// }

return true;
}
Expand Down

0 comments on commit 5678858

Please sign in to comment.