Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Namespaces | Functions
eda.h File Reference
#include <cstdint>
Include dependency graph for eda.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Consensus
 

Functions

uint32_t CalculateNextWorkRequired (const CBlockIndex *pindexPrev, int64_t nFirstBlockTime, const Consensus::Params &params)
 Do difficulty adjustement Satoshi's way.
 
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).
 
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.
 

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: