Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
eda.h
Go to the documentation of this file.
1// Copyright (c) 2017-2020 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_POW_EDA_H
6#define BITCOIN_POW_EDA_H
7
8#include <cstdint>
9
10class arith_uint256;
11class CBlockHeader;
12class CBlockIndex;
13
14namespace Consensus {
15struct Params;
16}
17
20 const Consensus::Params &params);
21
23 const CBlockHeader *pblock,
24 const Consensus::Params &params);
25
37
38#endif // BITCOIN_POW_EDA_H
const CChainParams & Params()
Return the currently selected parameters.
Nodes collect new transactions into a block, hash them into a hash tree, and scan through nonce value...
Definition block.h:23
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition blockindex.h:25
256-bit unsigned big integer.
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 Di...
Definition eda.cpp:45
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,...
Definition eda.cpp:119
uint32_t CalculateNextWorkRequired(const CBlockIndex *pindexPrev, int64_t nFirstBlockTime, const Consensus::Params &params)
Do difficulty adjustement Satoshi's way.
Definition eda.cpp:14
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
Parameters that influence chain consensus.
Definition params.h:34