X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.h;h=f7918fcf50c0ae0d781347749b201371181fe87c;hb=050edc2860c508b16f700bf069827310d5feb48c;hp=8b92292645bbfc4d252ec0d3c85dca98d98c69f3;hpb=2cf54c4aefe0d5181db922a6d8ebf229e3e4d251;p=novacoin.git diff --git a/src/main.h b/src/main.h index 8b92292..f7918fc 100644 --- a/src/main.h +++ b/src/main.h @@ -89,6 +89,7 @@ extern std::map mapOrphanBlocks; // Settings extern int64 nTransactionFee; extern bool fStakeUsePooledKeys; +extern unsigned int nDerivationMethodIndex; // Minimum disk space required - used in CheckDiskSpace() static const uint64 nMinDiskSpace = 52428800; @@ -111,12 +112,9 @@ CBlockIndex* FindBlockByHeight(int nHeight); bool ProcessMessages(CNode* pfrom); bool SendMessages(CNode* pto, bool fSendTrickle); bool LoadExternalBlockFile(FILE* fileIn); -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); -bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey); -bool CheckStake(CBlock* pblock, CWallet& wallet); + bool CheckProofOfWork(uint256 hash, unsigned int nBits); +unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake); int64 GetProofOfWorkReward(unsigned int nBits); int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTime, bool bCoinYearOnly=false); unsigned int ComputeMinWork(unsigned int nBase, int64 nTime);