Bitcoin ABC 0.30.5
P2P Digital Currency
|
#include <cstdint>
Go to the source code of this file.
Namespaces | |
namespace | Consensus |
Functions | |
uint32_t | GetNextDAAWorkRequired (const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params ¶ms) |
Compute the next required proof of work using a weighted average of the estimated hashrate per block. More... | |
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.