X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.h;h=c6e6558de82be1a26f414aad33ff1b02a0e4f948;hb=f94158ea104e435166e6e6074f0d941b903267eb;hp=b75a679ac8a40493c6456dfe7896bc80ca5ebc72;hpb=193076d3a965c11ab7c811f249ceaa9e54714920;p=novacoin.git diff --git a/src/main.h b/src/main.h index b75a679..c6e6558 100644 --- a/src/main.h +++ b/src/main.h @@ -81,7 +81,7 @@ extern CBlockIndex* pindexBest; extern unsigned int nTransactionsUpdated; extern uint64_t nLastBlockTx; extern uint64_t nLastBlockSize; -extern int64_t nLastCoinStakeSearchInterval; +extern uint32_t nLastCoinStakeSearchInterval; extern const std::string strMessageMagic; extern int64_t nTimeBestReceived; extern CCriticalSection cs_setpwalletRegistered; @@ -93,7 +93,6 @@ extern std::map mapOrphanBlocks; extern int64_t nTransactionFee; extern int64_t nMinimumInputValue; extern bool fUseFastIndex; -extern unsigned int nDerivationMethodIndex; extern int nScriptCheckThreads; extern const uint256 entropyStore[38]; @@ -112,6 +111,8 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock); bool CheckDiskSpace(uint64_t nAdditionalBytes=0); FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb"); FILE* AppendBlockFile(unsigned int& nFileRet); + +void UnloadBlockIndex(); bool LoadBlockIndex(bool fAllowNew=true); void PrintBlockTree(); CBlockIndex* FindBlockByHeight(int nHeight); @@ -127,7 +128,7 @@ void ThreadScriptCheckQuit(); bool CheckProofOfWork(uint256 hash, unsigned int nBits); unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake); int64_t GetProofOfWorkReward(unsigned int nBits, int64_t nFees=0); -int64_t GetProofOfStakeReward(int64_t nCoinAge, unsigned int nBits, unsigned int nTime, bool bCoinYearOnly=false); +int64_t GetProofOfStakeReward(int64_t nCoinAge, unsigned int nBits, int64_t nTime, bool bCoinYearOnly=false); unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime); unsigned int ComputeMinStake(unsigned int nBase, int64_t nTime, unsigned int nBlockTime); int GetNumBlocksOfPeers();