diff --git a/common/nym-lp-data/src/mixnodes/mod.rs b/common/nym-lp-data/src/mixnodes/mod.rs index ecb11512ec..3f62a665ed 100644 --- a/common/nym-lp-data/src/mixnodes/mod.rs +++ b/common/nym-lp-data/src/mixnodes/mod.rs @@ -2,4 +2,3 @@ // SPDX-License-Identifier: Apache-2.0 pub mod traits; -pub mod types; diff --git a/common/nym-lp-data/src/mixnodes/types.rs b/common/nym-lp-data/src/mixnodes/types.rs deleted file mode 100644 index 5d53f83a0b..0000000000 --- a/common/nym-lp-data/src/mixnodes/types.rs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2026 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::common::traits::{Framing, Transport, WireWrappingPipeline}; -use crate::{AddressedTimedData, AddressedTimedPayload}; - -/// The generic pipeline struct for a mixnode -pub struct Pipeline { - pub packet_size: usize, - pub framing: F, - pub transport: T, - _marker: std::marker::PhantomData, -} - -impl Framing for Pipeline -where - F: Framing, -{ - type Frame = F::Frame; - const OVERHEAD_SIZE: usize = F::OVERHEAD_SIZE; - - fn to_frame( - &self, - payload: AddressedTimedPayload, - frame_size: usize, - ) -> Vec> { - self.framing.to_frame(payload, frame_size) - } -} - -impl Transport for Pipeline -where - T: Transport, -{ - type Frame = T::Frame; - const OVERHEAD_SIZE: usize = T::OVERHEAD_SIZE; - - fn to_transport_packet( - &self, - frame: AddressedTimedData, - ) -> AddressedTimedData { - self.transport.to_transport_packet(frame) - } -} - -impl WireWrappingPipeline for Pipeline -where - Ts: Clone, - NdId: Clone, - F: Framing, - T: Transport, -{ - fn packet_size(&self) -> usize { - self.packet_size - } -}