Skip to content

Commit

Permalink
Update src/Nethermind/Nethermind.JsonRpc/Modules/Eth/FeeHistory/FeeHi…
Browse files Browse the repository at this point in the history
…storyOracle.cs

Co-authored-by: Lukasz Rozmej <[email protected]>
  • Loading branch information
yerke26 and LukaszRozmej authored Dec 11, 2024
1 parent 13b65bd commit 6475265
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,10 @@ BlockFeeHistorySearchInfo BlockFeeHistorySearchInfoFromBlock(Block b)
{
BlobGasCalculator.TryCalculateFeePerBlobGas(b.Header, out UInt256 feePerBlobGas);

double maxBlobGasPerBlock;
if (!_specProvider.GetSpec(b.Header).IsEip7742Enabled)
{
maxBlobGasPerBlock = Eip4844Constants.GetMaxBlobsPerBlock();
}
else if (b.Header.TargetBlobCount.HasValue)
{
maxBlobGasPerBlock = b.Header.TargetBlobCount.Value * 2;
}
else
{
throw new InvalidBlockException(b, "header is missing TargetBlobCount");
}
IReleaseSpec spec = _specProvider.GetSpec(b.Header);
double maxBlobGasPerBlock = !spec.IsEip7742Enabled
? Eip4844Constants.GetMaxBlobsPerBlock()
: b.Header.TargetBlobCount * 2 ?? throw new InvalidBlockException(b, "header is missing TargetBlobCount");

return new(
b.Number,
Expand Down

0 comments on commit 6475265

Please sign in to comment.