diff --git a/examples/custom-node/src/network.rs b/examples/custom-node/src/network.rs index bb03e400a6..23752f495b 100644 --- a/examples/custom-node/src/network.rs +++ b/examples/custom-node/src/network.rs @@ -1,7 +1,7 @@ use crate::{ chainspec::CustomChainSpec, primitives::{ - CustomHeader, CustomNodePrimitives, CustomTransactionEnvelope, ExtendedOpTxEnvelope, + CustomHeader, CustomNodePrimitives, CustomTransaction, CustomTransactionEnvelope, }, }; use alloy_consensus::{Block, BlockBody}; @@ -22,9 +22,9 @@ pub struct CustomNetworkPrimitives; impl NetworkPrimitives for CustomNetworkPrimitives { type BlockHeader = CustomHeader; - type BlockBody = BlockBody, CustomHeader>; - type Block = Block, CustomHeader>; - type BroadcastedTransaction = ExtendedOpTxEnvelope; + type BlockBody = BlockBody; + type Block = Block; + type BroadcastedTransaction = CustomTransaction; type PooledTransaction = Extended; type Receipt = OpReceipt; } diff --git a/examples/custom-node/src/primitives/block.rs b/examples/custom-node/src/primitives/block.rs index 3de2831c41..d8db04e245 100644 --- a/examples/custom-node/src/primitives/block.rs +++ b/examples/custom-node/src/primitives/block.rs @@ -1,9 +1,7 @@ -use crate::primitives::{CustomHeader, CustomTransactionEnvelope, ExtendedOpTxEnvelope}; +use crate::primitives::{CustomHeader, CustomTransaction}; /// The Block type of this node -pub type Block = - alloy_consensus::Block, CustomHeader>; +pub type Block = alloy_consensus::Block; /// The body type of this node -pub type BlockBody = - alloy_consensus::BlockBody, CustomHeader>; +pub type BlockBody = alloy_consensus::BlockBody; diff --git a/examples/custom-node/src/primitives/mod.rs b/examples/custom-node/src/primitives/mod.rs index dd9a2228a2..773ff4888c 100644 --- a/examples/custom-node/src/primitives/mod.rs +++ b/examples/custom-node/src/primitives/mod.rs @@ -22,6 +22,6 @@ impl NodePrimitives for CustomNodePrimitives { type Block = Block; type BlockHeader = CustomHeader; type BlockBody = BlockBody; - type SignedTx = ExtendedOpTxEnvelope; + type SignedTx = CustomTransaction; type Receipt = OpReceipt; } diff --git a/examples/custom-node/src/primitives/tx.rs b/examples/custom-node/src/primitives/tx.rs index 82d0436f5a..4b1f1e8824 100644 --- a/examples/custom-node/src/primitives/tx.rs +++ b/examples/custom-node/src/primitives/tx.rs @@ -20,6 +20,9 @@ use reth_op::primitives::{Extended, SignedTransaction}; use revm_primitives::{Address, Bytes}; use serde::{Deserialize, Serialize}; +/// An [`OpTxEnvelope`] that is [`Extended`] by one more variant of [`CustomTransactionEnvelope`]. +pub type CustomTransaction = ExtendedOpTxEnvelope; + /// A [`SignedTransaction`] implementation that combines the [`OpTxEnvelope`] and another /// transaction type. pub type ExtendedOpTxEnvelope = Extended;