Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions crates/ethereum/node/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,7 @@ impl<N: FullNodeComponents<Types = Self>> DebugNode<N> for EthereumNode {
type RpcBlock = alloy_rpc_types_eth::Block;

fn rpc_to_primitive_block(rpc_block: Self::RpcBlock) -> reth_ethereum_primitives::Block {
let alloy_rpc_types_eth::Block { header, transactions, withdrawals, .. } = rpc_block;
reth_ethereum_primitives::Block {
header: header.inner,
body: reth_ethereum_primitives::BlockBody {
transactions: transactions
.into_transactions()
.map(|tx| tx.inner.into_inner().into())
.collect(),
ommers: Default::default(),
withdrawals,
},
}
rpc_block.into_consensus().convert_transactions()
}
}

Expand Down
9 changes: 1 addition & 8 deletions crates/optimism/node/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down
Loading