39 "Staking rewards for block %s: not ready yet\n",
46 if (o.nValue < required) {
51 if (o.scriptPubKey == winner) {
57 "Staking rewards for block %s: payout script mismatch!\n",
61 "policy-bad-staking-reward",
62 strprintf(
"Block %s violates staking reward policy",
bool isAvalancheEnabled(const ArgsManager &argsman)
static constexpr bool AVALANCHE_DEFAULT_STAKING_REWARDS
Is avalanche staking rewards enabled by default.
std::unique_ptr< avalanche::Processor > g_avalanche
Global avalanche instance.
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
std::vector< CTransactionRef > vtx
CBlockIndex * pprev
pointer to the index of the predecessor of this block
BlockHash GetBlockHash() const
Serialized script, used inside transaction inputs and outputs.
bool operator()(BlockPolicyValidationState &state) override
const Amount & m_blockReward
const CBlockIndex & m_blockIndex
bool Invalid(Result result, const std::string &reject_reason="", const std::string &debug_message="")
std::string ToString() const
#define LogPrint(category,...)
@ POLICY_VIOLATION
A block policy rule was violated. This block should be parked.
static constexpr int STAKING_REWARD_RATIO
Percentage of the block reward to be sent to staking rewards.
Amount GetStakingRewardsAmount(const Amount &coinbaseValue)
A BlockHash is a unqiue identifier for a block.