Bitcoin ABC  0.26.3
P2P Digital Currency
aserti32d.h
Go to the documentation of this file.
1 // Copyright (c) 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_ASERTI32D_H
6 #define BITCOIN_POW_ASERTI32D_H
7 
8 #include <cstdint>
9 
10 class arith_uint256;
11 class CBlockHeader;
12 class CBlockIndex;
13 
14 namespace Consensus {
15 struct Params;
16 }
17 
19  const int64_t nPowTargetSpacing,
20  const int64_t nTimeDiff, const int64_t nHeightDiff,
21  const arith_uint256 &powLimit,
22  const int64_t nHalfLife) noexcept;
23 
24 uint32_t GetNextASERTWorkRequired(const CBlockIndex *pindexPrev,
25  const CBlockHeader *pblock,
26  const Consensus::Params &params) noexcept;
27 
28 uint32_t
29 GetNextASERTWorkRequired(const CBlockIndex *pindexPrev,
30  const CBlockHeader *pblock,
31  const Consensus::Params &params,
32  const CBlockIndex *pindexAnchorBlock) noexcept;
33 
34 #endif // BITCOIN_POW_ASERTI32D_H
arith_uint256 CalculateASERT(const arith_uint256 &refTarget, const int64_t nPowTargetSpacing, const int64_t nTimeDiff, const int64_t nHeightDiff, const arith_uint256 &powLimit, const int64_t nHalfLife) noexcept
Definition: aserti32d.cpp:84
uint32_t GetNextASERTWorkRequired(const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params &params) noexcept
Definition: aserti32d.cpp:9
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:26
256-bit unsigned big integer.
Parameters that influence chain consensus.
Definition: params.h:34