From 36b8ba6b88a72e6afb75d213e0ce0f014bedd62d Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Thu, 1 Aug 2024 14:52:49 +0200 Subject: [PATCH] node: remove TxFilter --- node/src/lib.rs | 10 ---------- node/src/mempool.rs | 20 -------------------- 2 files changed, 30 deletions(-) diff --git a/node/src/lib.rs b/node/src/lib.rs index 422ab1a1a3..79911dc126 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -133,16 +133,6 @@ pub trait LongLivedService: Ok(()) } - async fn add_filter( - &self, - topic: u8, - filter_fn: BoxedFilter, - network: &Arc>, - ) -> anyhow::Result<()> { - network.write().await.add_filter(topic, filter_fn).await?; - Ok(()) - } - /// Returns service name. fn name(&self) -> &'static str; } diff --git a/node/src/mempool.rs b/node/src/mempool.rs index 942922b59a..4f5b484696 100644 --- a/node/src/mempool.rs +++ b/node/src/mempool.rs @@ -48,16 +48,6 @@ impl Default for MempoolSrv { } } -pub struct TxFilter {} -impl crate::Filter for TxFilter { - fn filter(&mut self, _msg: &Message) -> anyhow::Result<()> { - // TODO: Ensure transaction does not exist in the mempool state - // TODO: Ensure transaction does not exist in blockchain - // TODO: Check Nullifier - Ok(()) - } -} - #[async_trait] impl LongLivedService for MempoolSrv @@ -85,16 +75,6 @@ impl ) .await?; - // Add a filter that will discard any transactions invalid to the actual - // mempool, blockchain state. - LongLivedService::::add_filter( - self, - Topics::Tx.into(), - Box::new(TxFilter {}), - &network, - ) - .await?; - loop { if let Ok(msg) = self.inbound.recv().await { match &msg.payload {