Fabcoin Core  0.16.2
P2P Digital Currency
Functions
pow.h File Reference
#include <consensus/params.h>
#include <arith_uint256.h>
#include <stdint.h>
Include dependency graph for pow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

unsigned int GetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params &)
 
unsigned int CalculateNextWorkRequired (arith_uint256 bnAvg, int64_t nLastBlockTime, int64_t nFirstBlockTime, const Consensus::Params &params)
 
unsigned int LwmaGetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params &)
 Zawy's LWMA - next generation algorithm. More...
 
unsigned int LwmaCalculateNextWorkRequired (const CBlockIndex *pindexLast, const Consensus::Params &params)
 
unsigned int DigishieldGetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params &)
 Digishield v3 - used in Fabcoin mainnet currently. More...
 
unsigned int DigishieldCalculateNextWorkRequired (const CBlockIndex *pindexLast, arith_uint256 bnAvg, int64_t nLastBlockTime, int64_t nFirstBlockTime, const Consensus::Params &params)
 
unsigned int ReduceDifficultyBy (const CBlockIndex *pindexLast, int64_t multiplier, const Consensus::Params &params)
 Reduce the difficulty by a given multiplier. More...
 
bool CheckEquihashSolution (const CBlockHeader *pblock, const CChainParams &)
 Check whether the Equihash solution in a block header is valid. More...
 
bool CheckProofOfWork (uint256 hash, unsigned int nBits, bool postfork, const Consensus::Params &)
 Check whether a block hash satisfies the proof-of-work requirement specified by nBits. More...
 

Function Documentation

unsigned int CalculateNextWorkRequired ( arith_uint256  bnAvg,
int64_t  nLastBlockTime,
int64_t  nFirstBlockTime,
const Consensus::Params params 
)
bool CheckEquihashSolution ( const CBlockHeader pblock,
const CChainParams  
)

Check whether the Equihash solution in a block header is valid.

Definition at line 258 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Definition at line 290 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int DigishieldCalculateNextWorkRequired ( const CBlockIndex pindexLast,
arith_uint256  bnAvg,
int64_t  nLastBlockTime,
int64_t  nFirstBlockTime,
const Consensus::Params params 
)

Definition at line 218 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int DigishieldGetNextWorkRequired ( const CBlockIndex pindexLast,
const CBlockHeader pblock,
const Consensus::Params  
)

Digishield v3 - used in Fabcoin mainnet currently.

Definition at line 193 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int GetNextWorkRequired ( const CBlockIndex pindexLast,
const CBlockHeader pblock,
const Consensus::Params  
)

Definition at line 18 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int LwmaCalculateNextWorkRequired ( const CBlockIndex pindexLast,
const Consensus::Params params 
)

Definition at line 96 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int LwmaGetNextWorkRequired ( const CBlockIndex pindexLast,
const CBlockHeader pblock,
const Consensus::Params  
)

Zawy's LWMA - next generation algorithm.

Definition at line 64 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int ReduceDifficultyBy ( const CBlockIndex pindexLast,
int64_t  multiplier,
const Consensus::Params params 
)

Reduce the difficulty by a given multiplier.

It doesn't check uint256 overflow!

Definition at line 242 of file pow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: