Function distribute_block_reward

Source
pub async fn distribute_block_reward(
    instance_state: &NodeState,
    validated_state: &mut ValidatedState,
    parent_leaf: &Leaf2,
    view_number: ViewNumber,
    version: Version,
) -> Result<Option<RewardDistributor>>
Expand description

Distributes the block reward for a given block height

Rewards are only distributed if the block belongs to an epoch beyond the second epoch.

The function also calculates the appropriate reward (fixed or dynamic) based on the protocol version.