Bitcoin ABC 0.30.7
P2P Digital Currency
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
18uint32_t CalculateNextWorkRequired(const CBlockIndex *pindexPrev,
19 int64_t nFirstBlockTime,
20 const Consensus::Params &params);
21
22uint32_t GetNextEDAWorkRequired(const CBlockIndex *pindexPrev,
23 const CBlockHeader *pblock,
24 const Consensus::Params &params);
25
35 uint32_t old_nbits,
36 arith_uint256 new_target);
37
38#endif // BITCOIN_POW_EDA_H
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:19
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
Parameters that influence chain consensus.
Definition: params.h:34