X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.h;h=c7784ccf651d6a70704048f43152f4d3dce266d1;hb=1c7ed42093c5935e3958584ed98a2b03466a0023;hp=d2df098c02960c7d20eab7bd31e9e16baacc6ea2;hpb=126e51d5d96f8bc2c900df18af5827c279967dcc;p=novacoin.git diff --git a/src/main.h b/src/main.h index d2df098..c7784cc 100644 --- a/src/main.h +++ b/src/main.h @@ -47,23 +47,18 @@ static const int64_t MAX_MINT_PROOF_OF_WORK = 100 * COIN; static const int64_t MAX_MINT_PROOF_OF_STAKE = 1 * COIN; static const int64_t MIN_TXOUT_AMOUNT = CENT/100; + inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } // Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC // Maximum number of script-checking threads allowed static const int MAX_SCRIPTCHECK_THREADS = 16; -#ifdef USE_UPNP -static const int fHaveUPnP = true; -#else -static const int fHaveUPnP = false; -#endif - static const uint256 hashGenesisBlock("0x00000a060336cbb72fe969666d337b87198b1add2abaa59cca226820b32933a4"); static const uint256 hashGenesisBlockTestNet("0x000c763e402f2436da9ed36c7286f62c3f6e5dbafce9ff289bd43d7459327eb"); -inline int64_t PastDrift(int64_t nTime) { return nTime - 2 * 60 * 60; } // up to 2 hours from the past -inline int64_t FutureDrift(int64_t nTime) { return nTime + 2 * 60 * 60; } // up to 2 hours from the future +inline int64_t PastDrift(int64_t nTime) { return nTime - 2 * nOneHour; } // up to 2 hours from the past +inline int64_t FutureDrift(int64_t nTime) { return nTime + 2 * nOneHour; } // up to 2 hours from the future extern CScript COINBASE_FLAGS; extern CCriticalSection cs_main; @@ -137,7 +132,6 @@ std::string GetWarnings(std::string strFor); bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock); uint256 WantedByOrphan(const CBlock* pblockOrphan); const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake); -void StakeMiner(CWallet *pwallet); void ResendWalletTransactions(); bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType); @@ -1452,7 +1446,7 @@ public: uint256 GetBlockHash() const { - if (fUseFastIndex && (nTime < GetAdjustedTime() - 24 * 60 * 60) && blockHash != 0) + if (fUseFastIndex && (nTime < GetAdjustedTime() - nOneDay) && blockHash != 0) return blockHash; CBlock block;