Bitcoin ABC  0.26.3
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 
10 struct Amount;
11 class CBlock;
12 class CBlockIndex;
13 
15 private:
16  const CBlock &m_block;
19 
20 public:
21  StakingRewardsPolicy(const CBlockIndex &blockIndex, const CBlock &block,
22  const Amount &blockReward)
23  : m_block(block), m_blockReward(blockReward), m_blockIndex(blockIndex) {
24  }
25 
26  bool operator()(BlockPolicyValidationState &state) override;
27 };
28 
29 Amount GetStakingRewardsAmount(const Amount &coinbaseValue);
30 
31 #endif // BITCOIN_POLICY_BLOCK_STAKINGREWARDS_H
Definition: block.h:55
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:26
const CBlock & m_block
bool operator()(BlockPolicyValidationState &state) override
const Amount & m_blockReward
StakingRewardsPolicy(const CBlockIndex &blockIndex, const CBlock &block, const Amount &blockReward)
const CBlockIndex & m_blockIndex
Amount GetStakingRewardsAmount(const Amount &coinbaseValue)
Definition: amount.h:19