Skip to content

Commit

Permalink
refactor(rm fragment expiry filter): fragment generator
Browse files Browse the repository at this point in the history
load tester
  • Loading branch information
cong-or committed Oct 25, 2023
1 parent 55c798d commit 8de0e7a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub enum FragmentRejectionReason {
FragmentInvalid,
PreviousFragmentInvalid,
PoolOverflow,
FragmentExpired,
FragmentValidForTooLong,
}

Expand Down
15 changes: 0 additions & 15 deletions jormungandr/src/fragment/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8de0e7a

Please sign in to comment.