![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include "pow.h"
#include "arith_uint256.h"
#include "chain.h"
#include "chainparams.h"
#include "primitives/block.h"
#include "uint256.h"
#include "util.h"
#include <math.h>
Go to the source code of this file.
Functions | |
unsigned static int | KimotoGravityWell (const CBlockIndex *pindexLast, const Consensus::Params ¶ms) |
unsigned static int | DarkGravityWave (const CBlockIndex *pindexLast, const Consensus::Params ¶ms) |
unsigned int | GetNextWorkRequiredBTC (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params ¶ms) |
unsigned int | GetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params ¶ms) |
unsigned int | CalculateNextWorkRequired (const CBlockIndex *pindexLast, int64_t nFirstBlockTime, const Consensus::Params ¶ms) |
bool | CheckProofOfWork (uint256 hash, unsigned int nBits, const Consensus::Params ¶ms) |
arith_uint256 | GetBlockProof (const CBlockIndex &block) |
int64_t | GetBlockProofEquivalentTime (const CBlockIndex &to, const CBlockIndex &from, const CBlockIndex &tip, const Consensus::Params ¶ms) |
unsigned int CalculateNextWorkRequired | ( | const CBlockIndex * | pindexLast, |
int64_t | nFirstBlockTime, | ||
const Consensus::Params & | params | ||
) |
bool CheckProofOfWork | ( | uint256 | hash, |
unsigned int | nBits, | ||
const Consensus::Params & | |||
) |
Check whether a block hash satisfies the proof-of-work requirement specified by nBits
Definition at line 238 of file pow.cpp.
Referenced by CheckBlockHeader(), generate(), CBlockTreeDB::LoadBlockIndexGuts(), and ReadBlockFromDisk().
|
static |
Definition at line 83 of file pow.cpp.
Referenced by GetNextWorkRequired().
arith_uint256 GetBlockProof | ( | const CBlockIndex & | block | ) |
Definition at line 257 of file pow.cpp.
Referenced by AddToBlockIndex(), CheckForkWarningConditions(), CheckForkWarningConditionsOnNewFork(), GetBlockProofEquivalentTime(), and LoadBlockIndexDB().
int64_t GetBlockProofEquivalentTime | ( | const CBlockIndex & | to, |
const CBlockIndex & | from, | ||
const CBlockIndex & | tip, | ||
const Consensus::Params & | |||
) |
Return the time it would take to redo the work difference between from and to, assuming the current hashrate corresponds to the difficulty at tip, in seconds.
Definition at line 272 of file pow.cpp.
Referenced by ConnectBlock(), and ProcessGetData().
unsigned int GetNextWorkRequired | ( | const CBlockIndex * | pindexLast, |
const CBlockHeader * | pblock, | ||
const Consensus::Params & | params | ||
) |
Definition at line 172 of file pow.cpp.
Referenced by ContextualCheckBlockHeader(), CreateNewBlock(), and UpdateTime().
unsigned int GetNextWorkRequiredBTC | ( | const CBlockIndex * | pindexLast, |
const CBlockHeader * | pblock, | ||
const Consensus::Params & | params | ||
) |
Definition at line 133 of file pow.cpp.
Referenced by GetNextWorkRequired().
|
static |
Definition at line 17 of file pow.cpp.
Referenced by GetNextWorkRequired().