chore: integrate Test trait for sealed types (#13746)

This commit is contained in:
Matthias Seitz
2025-01-09 09:06:28 +01:00
committed by GitHub
parent d0684cf8bb
commit 383eb2331c
7 changed files with 119 additions and 17 deletions

View File

@ -64,8 +64,7 @@ pub fn validate_cancun_gas<H: BlockHeader, B: BlockBody>(
) -> Result<(), ConsensusError> {
// Check that the blob gas used in the header matches the sum of the blob gas used by each
// blob tx
let header_blob_gas_used =
block.header().blob_gas_used().ok_or(ConsensusError::BlobGasUsedMissing)?;
let header_blob_gas_used = block.blob_gas_used().ok_or(ConsensusError::BlobGasUsedMissing)?;
let total_blob_gas = block.body().blob_gas_used();
if total_blob_gas != header_blob_gas_used {
return Err(ConsensusError::BlobGasUsedDiff(GotExpected {