9
9
#![ cfg_attr( docsrs, feature( doc_cfg, doc_auto_cfg) ) ]
10
10
#![ allow( clippy:: useless_let_if_seq) ]
11
11
12
- use alloy_consensus:: { Header , EMPTY_OMMER_ROOT_HASH } ;
12
+ use alloy_consensus:: { Header , Transaction , Typed2718 , EMPTY_OMMER_ROOT_HASH } ;
13
13
use alloy_eips:: {
14
14
eip4844:: MAX_DATA_GAS_PER_BLOCK , eip6110, eip7685:: Requests , eip7840:: BlobParams ,
15
15
merge:: BEACON_NONCE ,
@@ -33,7 +33,7 @@ use reth_primitives::{
33
33
Block , BlockBody , EthereumHardforks , InvalidTransactionError , Receipt , RecoveredBlock ,
34
34
TransactionSigned ,
35
35
} ;
36
- use reth_primitives_traits:: Block as _;
36
+ use reth_primitives_traits:: { Block as _, SignedTransaction } ;
37
37
use reth_revm:: database:: StateProviderDatabase ;
38
38
use reth_storage_api:: StateProviderFactory ;
39
39
use reth_transaction_pool:: {
@@ -250,7 +250,7 @@ where
250
250
251
251
// There's only limited amount of blob space available per block, so we need to check if
252
252
// the EIP-4844 can still fit in the block
253
- if let Some ( blob_tx) = tx. transaction . as_eip4844 ( ) {
253
+ if let Some ( blob_tx) = tx. as_eip4844 ( ) {
254
254
let tx_blob_gas = blob_tx. blob_gas ( ) ;
255
255
if sum_blob_gas_used + tx_blob_gas > MAX_DATA_GAS_PER_BLOCK {
256
256
// we can't fit this _blob_ transaction into the block, so we mark it as
@@ -306,7 +306,7 @@ where
306
306
evm. db_mut ( ) . commit ( state) ;
307
307
308
308
// add to the total blob gas used if the transaction successfully executed
309
- if let Some ( blob_tx) = tx. transaction . as_eip4844 ( ) {
309
+ if let Some ( blob_tx) = tx. as_eip4844 ( ) {
310
310
let tx_blob_gas = blob_tx. blob_gas ( ) ;
311
311
sum_blob_gas_used += tx_blob_gas;
312
312
@@ -332,9 +332,8 @@ where
332
332
} ) ) ;
333
333
334
334
// update add to total fees
335
- let miner_fee = tx
336
- . effective_tip_per_gas ( Some ( base_fee) )
337
- . expect ( "fee is always valid; execution succeeded" ) ;
335
+ let miner_fee =
336
+ tx. effective_tip_per_gas ( base_fee) . expect ( "fee is always valid; execution succeeded" ) ;
338
337
total_fees += U256 :: from ( miner_fee) * U256 :: from ( gas_used) ;
339
338
340
339
// append sender and transaction to the respective lists
@@ -419,7 +418,7 @@ where
419
418
// grab the blob sidecars from the executed txs
420
419
blob_sidecars = pool
421
420
. get_all_blobs_exact (
422
- executed_txs. iter ( ) . filter ( |tx| tx. is_eip4844 ( ) ) . map ( |tx| tx. hash ( ) ) . collect ( ) ,
421
+ executed_txs. iter ( ) . filter ( |tx| tx. is_eip4844 ( ) ) . map ( |tx| * tx. tx_hash ( ) ) . collect ( ) ,
423
422
)
424
423
. map_err ( PayloadBuilderError :: other) ?;
425
424
0 commit comments