Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Namespaces | Functions
daa.h File Reference
#include <cstdint>
Include dependency graph for daa.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 GetNextDAAWorkRequired (const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params &params)
 Compute the next required proof of work using a weighted average of the estimated hashrate per block.
 

Function Documentation

◆ GetNextDAAWorkRequired()

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

Compute the next required proof of work using a weighted average of the estimated hashrate per block.

Using a weighted average ensure that the timestamp parameter cancels out in most of the calculation - except for the timestamp of the first and last block. Because timestamps are the least trustworthy information we have as input, this ensures the algorithm is more resistant to malicious inputs.

Definition at line 91 of file daa.cpp.

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