X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.h;h=fe64412ba51f63f8975b9e13aaa9325899d1913b;hb=0c80f9494715c7dacd6c74a6a56092b416a4d60d;hp=4955be9787f6ce63cfe8a51a2a8551520324a657;hpb=c0e8991ed1b482d0dab75f86e415fc63d1104d68;p=novacoin.git diff --git a/src/main.h b/src/main.h index 4955be9..fe64412 100644 --- a/src/main.h +++ b/src/main.h @@ -43,7 +43,7 @@ static const unsigned int STAKE_SWITCH_TIME = 1371686400; // Thu, 20 Jun 2013 00 static const unsigned int TARGETS_SWITCH_TIME = 1374278400; // Sat, 20 Jul 2013 00:00:00 GMT static const unsigned int CHAINCHECKS_SWITCH_TIME = 1379635200; // Fri, 20 Sep 2013 00:00:00 GMT static const unsigned int STAKECURVE_SWITCH_TIME = 1382227200; // Sun, 20 Oct 2013 00:00:00 GMT -static const unsigned int STAKEWEIGHT_SWITCH_TIME = 1388534400; // Wed, 01 Jan 2014 00:00:00 GMT +static const unsigned int OUTPUT_SWITCH_TIME = 1398916800; // Thu, 01 May 2014 04:00:00 GMT inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } @@ -58,7 +58,9 @@ static const int fHaveUPnP = false; static const uint256 hashGenesisBlock("0x00000a060336cbb72fe969666d337b87198b1add2abaa59cca226820b32933a4"); static const uint256 hashGenesisBlockTestNet("0x000c763e402f2436da9ed36c7286f62c3f6e5dbafce9ff289bd43d7459327eb"); -static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours + +inline int64 PastDrift(int64 nTime) { return nTime - 2 * 60 * 60; } // up to 2 hours from the past +inline int64 FutureDrift(int64 nTime) { return nTime + 2 * 60 * 60; } // up to 2 hours from the future extern libzerocoin::Params* ZCParams; extern CScript COINBASE_FLAGS; @@ -91,6 +93,8 @@ extern int64 nMinimumInputValue; extern bool fUseFastIndex; extern unsigned int nDerivationMethodIndex; +extern bool fEnforceCanonical; + // Minimum disk space required - used in CheckDiskSpace() static const uint64 nMinDiskSpace = 52428800; @@ -1099,7 +1103,7 @@ public: bool CheckBlock(bool fCheckPOW=true, bool fCheckMerkleRoot=true, bool fCheckSig=true) const; bool AcceptBlock(); bool GetCoinAge(uint64& nCoinAge) const; // ppcoin: calculate total coin age spent in block - bool SignBlock(const CKeyStore& keystore); + bool SignBlock(CWallet& keystore); bool CheckBlockSignature(bool fProofOfStake) const; private: @@ -1407,7 +1411,7 @@ public: uint256 GetBlockHash() const { - if (fUseFastIndex && (nTime < GetAdjustedTime() - 12 * nMaxClockDrift) && blockHash != 0) + if (fUseFastIndex && (nTime < GetAdjustedTime() - 24 * 60 * 60) && blockHash != 0) return blockHash; CBlock block;