Bitcoin ABC 0.26.3
P2P Digital Currency
|
#include <cstdint>
Go to the source code of this file.
Namespaces | |
namespace | Consensus |
Functions | |
uint32_t | CalculateNextWorkRequired (const CBlockIndex *pindexPrev, int64_t nFirstBlockTime, const Consensus::Params ¶ms) |
Do difficulty adjustement Satoshi's way. | |
uint32_t | GetNextEDAWorkRequired (const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params ¶ms) |
Compute the next required proof of work using the legacy Bitcoin difficulty adjustment + Emergency Difficulty Adjustment (EDA). | |
bool | PermittedEDADifficultyTransition (const Consensus::Params ¶ms, uint32_t old_nbits, arith_uint256 new_target) |
Return false if the proof-of-work requirement specified by new_target is not possible, given the proof-of-work on the prior block as specified by old_nbits. | |
uint32_t CalculateNextWorkRequired | ( | const CBlockIndex * | pindexPrev, |
int64_t | nFirstBlockTime, | ||
const Consensus::Params & | params | ||
) |
uint32_t GetNextEDAWorkRequired | ( | const CBlockIndex * | pindexPrev, |
const CBlockHeader * | pblock, | ||
const Consensus::Params & | params | ||
) |
bool PermittedEDADifficultyTransition | ( | const Consensus::Params & | params, |
uint32_t | old_nbits, | ||
arith_uint256 | new_target | ||
) |
Return false if the proof-of-work requirement specified by new_target is not possible, given the proof-of-work on the prior block as specified by old_nbits.
This function only checks that the new value is within a factor of 4 of the old value for blocks.
Definition at line 119 of file eda.cpp.