mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: base fee param fetching at a specific block (#7783)
This commit is contained in:
committed by
GitHub
parent
24a8202481
commit
9a1d6ea9ca
@ -245,7 +245,8 @@ impl PayloadBuilderAttributes for EthPayloadBuilderAttributes {
|
||||
})
|
||||
.map(BlobExcessGasAndPrice::new);
|
||||
|
||||
let mut basefee = parent.next_block_base_fee(chain_spec.base_fee_params(self.timestamp()));
|
||||
let mut basefee =
|
||||
parent.next_block_base_fee(chain_spec.base_fee_params_at_timestamp(self.timestamp()));
|
||||
|
||||
let mut gas_limit = U256::from(parent.gas_limit);
|
||||
|
||||
@ -253,7 +254,7 @@ impl PayloadBuilderAttributes for EthPayloadBuilderAttributes {
|
||||
// elasticity multiplier to get the new gas limit.
|
||||
if chain_spec.fork(Hardfork::London).transitions_at_block(parent.number + 1) {
|
||||
let elasticity_multiplier =
|
||||
chain_spec.base_fee_params(self.timestamp()).elasticity_multiplier;
|
||||
chain_spec.base_fee_params_at_timestamp(self.timestamp()).elasticity_multiplier;
|
||||
|
||||
// multiply the gas limit by the elasticity multiplier
|
||||
gas_limit *= U256::from(elasticity_multiplier);
|
||||
|
||||
Reference in New Issue
Block a user