From 8de0e7a426cd67bdff6dfc6b557d762c9e0a5be1 Mon Sep 17 00:00:00 2001 From: cong-or Date: Wed, 25 Oct 2023 12:27:43 +0100 Subject: [PATCH] refactor(rm fragment expiry filter): fragment generator load tester --- .../interfaces/fragments_processing_summary.rs | 1 - jormungandr/src/fragment/pool.rs | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/jormungandr-lib/src/interfaces/fragments_processing_summary.rs b/jormungandr-lib/src/interfaces/fragments_processing_summary.rs index fc225ea74b..63c18e280a 100644 --- a/jormungandr-lib/src/interfaces/fragments_processing_summary.rs +++ b/jormungandr-lib/src/interfaces/fragments_processing_summary.rs @@ -13,7 +13,6 @@ pub enum FragmentRejectionReason { FragmentInvalid, PreviousFragmentInvalid, PoolOverflow, - FragmentExpired, FragmentValidForTooLong, } diff --git a/jormungandr/src/fragment/pool.rs b/jormungandr/src/fragment/pool.rs index bf7ff22f38..fac945a7bf 100644 --- a/jormungandr/src/fragment/pool.rs +++ b/jormungandr/src/fragment/pool.rs @@ -109,21 +109,6 @@ impl Pool { return Err(FragmentRejectionReason::FragmentAlreadyInLog); } - if let Some(valid_until) = get_transaction_expiry_date(fragment) { - use chain_impl_mockchain::ledger::check::{valid_transaction_date, TxValidityError}; - match valid_transaction_date(ledger_settings, valid_until, block_date) { - Ok(_) => {} - Err(TxValidityError::TransactionExpired) => { - tracing::debug!("fragment is expired at the time of receiving"); - return Err(FragmentRejectionReason::FragmentExpired); - } - Err(TxValidityError::TransactionValidForTooLong) => { - tracing::debug!("fragment is valid for too long"); - return Err(FragmentRejectionReason::FragmentValidForTooLong); - } - } - } - if !is_fragment_valid(fragment) { tracing::debug!("fragment is invalid, not including to the pool"); return Err(FragmentRejectionReason::FragmentInvalid);