Bitcoin ABC 0.30.7
P2P Digital Currency
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
23private:
29
30public:
32 const Consensus::Params &consensusParams,
33 const CBlockIndex &blockIndex, const CBlock &block,
34 const Amount &blockReward)
35 : m_avalanche(avalanche), m_block(block), m_blockReward(blockReward),
36 m_consensusParams(consensusParams), m_blockIndex(blockIndex) {}
37
38 bool operator()(BlockPolicyValidationState &state) override;
39};
40
41Amount GetStakingRewardsAmount(const Amount &coinbaseValue);
43 const CBlockIndex *pprev);
44
45#endif // BITCOIN_POLICY_BLOCK_STAKINGREWARDS_H
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:19
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
bool IsStakingRewardsActivated(const Consensus::Params &params, const CBlockIndex *pprev)
Amount GetStakingRewardsAmount(const Amount &coinbaseValue)
Definition: amount.h:19
Parameters that influence chain consensus.
Definition: params.h:34