48 if (params.fPowAllowMinDifficultyBlocks &&
50 pindexPrev->GetBlockTime() + 2 * params.nPowTargetSpacing)) {
85 const int64_t nPowTargetSpacing,
94 assert((powLimit >> 224) == 0);
125 "ASERT algorithm needs arithmetic shift support");
138 65536 + ((+195766423245049ull *
frac + 971821376ull *
frac *
frac +
arith_uint256 UintToArith256(const uint256 &a)
arith_uint256 CalculateASERT(const arith_uint256 &refTarget, const int64_t nPowTargetSpacing, const int64_t nTimeDiff, const int64_t nHeightDiff, const arith_uint256 &powLimit, const int64_t nHalfLife) noexcept
uint32_t GetNextASERTWorkRequired(const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params ¶ms) noexcept
The block chain is a tree shaped structure starting with the genesis block at the root,...
256-bit unsigned big integer.
arith_uint256 & SetCompact(uint32_t nCompact, bool *pfNegative=nullptr, bool *pfOverflow=nullptr)
The "compact" format is a representation of a whole number N using an unsigned 32bit number similar t...
uint32_t GetCompact(bool fNegative=false) const
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Parameters that influence chain consensus.