Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
stakingrewards.h
Go to the documentation of this file.
1// Copyright (c) 2023 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_POLICY_BLOCK_STAKINGREWARDS_H
6#define BITCOIN_POLICY_BLOCK_STAKINGREWARDS_H
7
9
10struct Amount;
11class CBlock;
12class CBlockIndex;
13
14namespace Consensus {
15struct Params;
16}
17
18namespace avalanche {
19class Processor;
20}
21
40
43 const CBlockIndex *pprev);
44
45#endif // BITCOIN_POLICY_BLOCK_STAKINGREWARDS_H
const CChainParams & Params()
Return the currently selected parameters.
Definition block.h:60
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition blockindex.h:25
const avalanche::Processor & m_avalanche
const CBlock & m_block
StakingRewardsPolicy(const avalanche::Processor &avalanche, const Consensus::Params &consensusParams, const CBlockIndex &blockIndex, const CBlock &block, const Amount &blockReward)
bool operator()(BlockPolicyValidationState &state) override
const Consensus::Params & m_consensusParams
const Amount & m_blockReward
const CBlockIndex & m_blockIndex
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
bool IsStakingRewardsActivated(const Consensus::Params &params, const CBlockIndex *pprev)
Amount GetStakingRewardsAmount(const Amount &coinbaseValue)
Parameters that influence chain consensus.
Definition params.h:34