reth_consensus_common::calc

Function base_block_reward

Source
pub fn base_block_reward(
    chain_spec: impl Hardforks,
    block_number: BlockNumber,
    block_difficulty: U256,
    total_difficulty: U256,
) -> Option<u128>
Expand description

Calculates the base block reward.

The base block reward is defined as:

  • For Paris and later: None
  • For Petersburg and later: Some(2 ETH)
  • For Byzantium and later: Some(3 ETH)
  • Otherwise: Some(5 ETH)

§Note

This does not include the reward for including ommers. To calculate the full block reward, see block_reward.

§References