Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

pow.cpp File Reference
#include <pow.h>
#include <arith_uint256.h>
#include <chain.h>
#include <chainparams.h>
#include <primitives/block.h>
#include <uint256.h>
#include <math.h>
+ Include dependency graph for pow.cpp:

Go to the source code of this file.

Functions

unsigned static int KimotoGravityWell (const CBlockIndex *pindexLast, const Consensus::Params &params)
 
unsigned static int DarkGravityWave (const CBlockIndex *pindexLast, const Consensus::Params &params)
 
unsigned int GetNextWorkRequiredBTC (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params &params)
 
unsigned int GetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params &params)
 
unsigned int CalculateNextWorkRequired (const CBlockIndex *pindexLast, int64_t nFirstBlockTime, const Consensus::Params &params)
 
bool CheckProofOfWork (uint256 hash, unsigned int nBits, const Consensus::Params &params)
 Check whether a block hash satisfies the proof-of-work requirement specified by nBits. More...
 

Function Documentation

◆ CalculateNextWorkRequired()

unsigned int CalculateNextWorkRequired ( const CBlockIndex pindexLast,
int64_t  nFirstBlockTime,
const Consensus::Params params 
)

◆ CheckProofOfWork()

bool CheckProofOfWork ( uint256  hash,
unsigned int  nBits,
const Consensus::Params params 
)

Check whether a block hash satisfies the proof-of-work requirement specified by nBits.

Definition at line 233 of file pow.cpp.

References Consensus::Params::powLimit, arith_uint256::SetCompact(), and UintToArith256().

Referenced by CheckBlockHeader(), CBlockTreeDB::LoadBlockIndexGuts(), and ReadBlockFromDisk().

◆ DarkGravityWave()

◆ GetNextWorkRequired()

◆ GetNextWorkRequiredBTC()

◆ KimotoGravityWell()

Released under the MIT license