Drop "MAY, 2018" clause for proposal validation on mainnet (#2101)

This commit is contained in:
UdjinM6 2018-06-06 19:06:23 +03:00 committed by GitHub
parent 6079b860e3
commit 6c79c348ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -470,8 +470,7 @@ bool CGovernanceObject::IsValidLocally(std::string& strError, bool& fMissingMast
// Note: It's ok to have expired proposals // Note: It's ok to have expired proposals
// they are going to be cleared by CGovernanceManager::UpdateCachesAndClean() // they are going to be cleared by CGovernanceManager::UpdateCachesAndClean()
// TODO: should they be tagged as "expired" to skip vote downloading? // TODO: should they be tagged as "expired" to skip vote downloading?
// DO NOT USE THIS UNTIL MAY, 2018 on mainnet if (!validator.Validate(false)) {
if ((GetAdjustedTime() >= 1526423380 || Params().NetworkIDString() != CBaseChainParams::MAIN) && !validator.Validate(false)) {
strError = strprintf("Invalid proposal data, error messages: %s", validator.GetErrorMessages()); strError = strprintf("Invalid proposal data, error messages: %s", validator.GetErrorMessages());
return false; return false;
} }

View File

@ -450,8 +450,7 @@ void CGovernanceManager::UpdateCachesAndClean()
mapObjects.erase(it++); mapObjects.erase(it++);
} else { } else {
// NOTE: triggers are handled via triggerman // NOTE: triggers are handled via triggerman
// DO NOT USE THIS UNTIL MAY, 2018 on mainnet if (pObj->GetObjectType() == GOVERNANCE_OBJECT_PROPOSAL) {
if ((GetAdjustedTime() >= 1526423380 || Params().NetworkIDString() != CBaseChainParams::MAIN) && pObj->GetObjectType() == GOVERNANCE_OBJECT_PROPOSAL) {
CProposalValidator validator(pObj->GetDataAsHexString()); CProposalValidator validator(pObj->GetDataAsHexString());
if (!validator.Validate()) { if (!validator.Validate()) {
LogPrintf("CGovernanceManager::UpdateCachesAndClean -- set for deletion expired obj %s\n", (*it).first.ToString()); LogPrintf("CGovernanceManager::UpdateCachesAndClean -- set for deletion expired obj %s\n", (*it).first.ToString());