Bitcoin ABC 0.30.7
P2P Digital Currency
Functions
eda.cpp File Reference
#include <pow/eda.h>
#include <arith_uint256.h>
#include <chain.h>
#include <consensus/params.h>
Include dependency graph for eda.cpp:

Go to the source code of this file.

Functions

uint32_t CalculateNextWorkRequired (const CBlockIndex *pindexPrev, int64_t nFirstBlockTime, const Consensus::Params &params)
 Do difficulty adjustement Satoshi's way. More...
 
uint32_t GetNextEDAWorkRequired (const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params &params)
 Compute the next required proof of work using the legacy Bitcoin difficulty adjustment + Emergency Difficulty Adjustment (EDA). More...
 
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. More...
 

Function Documentation

◆ CalculateNextWorkRequired()

uint32_t CalculateNextWorkRequired ( const CBlockIndex pindexPrev,
int64_t  nFirstBlockTime,
const Consensus::Params params 
)

Do difficulty adjustement Satoshi's way.

Definition at line 14 of file eda.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextEDAWorkRequired()

uint32_t GetNextEDAWorkRequired ( const CBlockIndex pindexPrev,
const CBlockHeader pblock,
const Consensus::Params params 
)

Compute the next required proof of work using the legacy Bitcoin difficulty adjustment + Emergency Difficulty Adjustment (EDA).

Definition at line 45 of file eda.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PermittedEDADifficultyTransition()

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.

Here is the call graph for this function:
Here is the caller graph for this function: