Skip to content

Commit

Permalink
Fix calculation of EIP1559 base fee to be up to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
DubbaThony committed Oct 11, 2024
1 parent 3d21134 commit 8a2fe3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static function getNextBlockBaseFee(Block $previous, EIP1559Config $confi
return new OOGmp(EIP1559Config::INITIAL_BASE_FEE);
}

$parentGasTarget = $previous->gasLimit / EIP1559Config::ELASTICITY_MULTIPLIER;
$parentGasTarget = (int)floor($previous->gasLimit / EIP1559Config::ELASTICITY_MULTIPLIER);
if($parentGasTarget == $previous->gasUsed) {
return $previous->baseFeePerGas;
}
Expand Down

0 comments on commit 8a2fe3d

Please sign in to comment.