chore: simplify rpc ro primitive block impls (#16487)

This commit is contained in:
Matthias Seitz
2025-05-27 16:03:32 +02:00
committed by GitHub
parent c36b5433ee
commit 02ace302b4
2 changed files with 2 additions and 20 deletions

View File

@@ -216,14 +216,7 @@ where
type RpcBlock = alloy_rpc_types_eth::Block<op_alloy_consensus::OpTxEnvelope>;
fn rpc_to_primitive_block(rpc_block: Self::RpcBlock) -> reth_node_api::BlockTy<Self> {
let alloy_rpc_types_eth::Block { header, transactions, .. } = rpc_block;
reth_optimism_primitives::OpBlock {
header: header.inner,
body: reth_optimism_primitives::OpBlockBody {
transactions: transactions.into_transactions().collect(),
..Default::default()
},
}
rpc_block.into_consensus()
}
}