X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fmain.cpp;h=9ff24e482f648e109e4b4cf023f0a21ce72a8dd5;hp=d96af0a28610ab9f77e2ecb237c0804dc6485207;hb=ad42655e7a1f22e2a75e14ad73776367229ed081;hpb=33d45ddc282cea089237530f08bb8368aa686ead diff --git a/src/main.cpp b/src/main.cpp index d96af0a..9ff24e4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,10 +42,10 @@ uint256 nPoWBase = uint256("0x00000000ffff00000000000000000000000000000000000000 CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 16); -unsigned int nStakeMinAge = 60 * 60 * 24 * 30; // 30 days as zero time weight -unsigned int nStakeMaxAge = 60 * 60 * 24 * 90; // 90 days as full weight +unsigned int nStakeMinAge = 30 * nOneDay; // 30 days as zero time weight +unsigned int nStakeMaxAge = 90 * nOneDay; // 90 days as full weight unsigned int nStakeTargetSpacing = 10 * 60; // 10-minute stakes spacing -unsigned int nModifierInterval = 6 * 60 * 60; // time to elapse before new modifier is computed +unsigned int nModifierInterval = 6 * nOneHour; // time to elapse before new modifier is computed int nCoinbaseMaturity = 500; @@ -2736,7 +2736,7 @@ bool LoadBlockIndex(bool fAllowNew) pchMessageStart[3] = 0xef; bnProofOfWorkLimit = bnProofOfWorkLimitTestNet; // 16 bits PoW target limit for testnet - nStakeMinAge = 2 * 60 * 60; // test net min age is 2 hours + nStakeMinAge = 2 * nOneHour; // test net min age is 2 hours nModifierInterval = 20 * 60; // test modifier interval is 20 minutes nCoinbaseMaturity = 10; // test maturity is 10 blocks nStakeTargetSpacing = 5 * 60; // test block spacing is 5 minutes @@ -3018,7 +3018,7 @@ string GetWarnings(string strFor) // if detected unmet upgrade requirement enter safe mode // Note: Modifier upgrade requires blockchain redownload if past protocol switch - if (IsFixedModifierInterval(nModifierUpgradeTime + 60*60*24)) // 1 day margin + if (IsFixedModifierInterval(nModifierUpgradeTime + nOneDay)) // 1 day margin { nPriority = 5000; strStatusBar = strRPC = "WARNING: Blockchain redownload required approaching or past v.0.4.4.6u4 upgrade deadline."; @@ -3295,7 +3295,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (hashSalt == 0) hashSalt = GetRandHash(); uint64_t hashAddr = addr.GetHash(); - uint256 hashRand = hashSalt ^ (hashAddr<<32) ^ ((GetTime()+hashAddr)/(24*60*60)); + uint256 hashRand = hashSalt ^ (hashAddr<<32) ^ ((GetTime()+hashAddr)/nOneDay); hashRand = Hash(BEGIN(hashRand), END(hashRand)); multimap mapMix; BOOST_FOREACH(CNode* pnode, vNodes) @@ -3317,7 +3317,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (fReachable) vAddrOk.push_back(addr); } - addrman.Add(vAddrOk, pfrom->addr, 2 * 60 * 60); + addrman.Add(vAddrOk, pfrom->addr, 2 * nOneHour); if (vAddr.size() < 1000) pfrom->fGetAddr = false; if (pfrom->fOneShot)