feat: make base fee computation parameters configurable via chain spec (#3992)

This commit is contained in:
Roberto Bayardo
2023-08-07 08:52:27 -07:00
committed by GitHub
parent aaf2d2cf19
commit 9569debbb5
24 changed files with 211 additions and 78 deletions

View File

@ -134,7 +134,9 @@ impl PayloadBuilderAttributes {
prevrandao: Some(self.prev_randao),
gas_limit: U256::from(parent.gas_limit),
// calculate basefee based on parent block's gas usage
basefee: U256::from(parent.next_block_base_fee().unwrap_or_default()),
basefee: U256::from(
parent.next_block_base_fee(chain_spec.base_fee_params).unwrap_or_default(),
),
};
(cfg, block_env)