Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(rm fragment expiry filter): fragment generator #4141

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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