X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.h;h=3f8ecbfbd246e535182f0de34900efc2a1458a67;hb=726b753c71c1ec24fd0f55a7badef4ef5a00769a;hp=817a297053fd6d7411797972d76409d4b86d2dad;hpb=6145f2d5e9f380a11bce933fe343d48fd8936a33;p=novacoin.git diff --git a/src/main.h b/src/main.h index 817a297..3f8ecbf 100644 --- a/src/main.h +++ b/src/main.h @@ -36,7 +36,10 @@ static const int64 MAX_MONEY = 2000000000 * COIN; static const int64 MAX_MINT_PROOF_OF_WORK = 100 * COIN; static const int64 MAX_MINT_PROOF_OF_STAKE = 1 * COIN; static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE; -static const unsigned int PROTOCOL_SWITCH_TIME = 1371686400; // 20 Jun 2013 00:00:00 +static const unsigned int STAKE_SWITCH_TIME = 1371686400; // 20 Jun 2013 00:00:00 +static const unsigned int TARGETS_SWITCH_TIME = 1374278400; // 20 Jul 2013 00:00:00 +static const unsigned int LOCKS_SWITCH_TIME = 1376956800; // 20 Aug 2013 00:00:00 +static const unsigned int CHAINCHECKS_SWITCH_TIME = 1379635200; // 20 Sep 2013 00:00:00 inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } // Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. @@ -104,7 +107,6 @@ CBlockIndex* FindBlockByHeight(int nHeight); bool ProcessMessages(CNode* pfrom); bool SendMessages(CNode* pto, bool fSendTrickle); bool LoadExternalBlockFile(FILE* fileIn); -void GenerateBitcoins(bool fGenerate, CWallet* pwallet); CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake=false); void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce); void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1); @@ -832,7 +834,7 @@ class CBlock { public: // header - static const int CURRENT_VERSION=4; + static const int CURRENT_VERSION=5; int nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; @@ -1239,14 +1241,7 @@ public: return (int64)nTime; } - CBigNum GetBlockTrust() const - { - CBigNum bnTarget; - bnTarget.SetCompact(nBits); - if (bnTarget <= 0) - return 0; - return (IsProofOfStake()? (CBigNum(1)<<256) / (bnTarget+1) : 1); - } + CBigNum GetBlockTrust() const; bool IsInMainChain() const {