chore(txpool): rename remove_invalid to remove_transactions (#1973)

This commit is contained in:
Matthias Seitz
2023-03-24 20:38:51 +01:00
committed by GitHub
parent ea4b4f77e9
commit 5f7171f125
4 changed files with 6 additions and 6 deletions

View File

@@ -300,11 +300,11 @@ where
Box::new(self.pool.best_transactions())
}
fn remove_invalid(
fn remove_transactions(
&self,
hashes: impl IntoIterator<Item = TxHash>,
) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>> {
self.pool.remove_invalid(hashes)
self.pool.remove_transactions(hashes)
}
fn retain_unknown(&self, hashes: &mut Vec<TxHash>) {

View File

@@ -347,11 +347,11 @@ where
}
/// Removes and returns all matching transactions from the pool.
pub(crate) fn remove_invalid(
pub(crate) fn remove_transactions(
&self,
hashes: impl IntoIterator<Item = TxHash>,
) -> Vec<Arc<ValidPoolTransaction<T::Transaction>>> {
let removed = self.pool.write().remove_invalid(hashes);
let removed = self.pool.write().remove_transactions(hashes);
let mut listener = self.event_listener.write();

View File

@@ -303,7 +303,7 @@ impl<T: TransactionOrdering> TxPool<T> {
}
/// Removes and returns all matching transactions from the pool.
pub(crate) fn remove_invalid(
pub(crate) fn remove_transactions(
&mut self,
hashes: impl IntoIterator<Item = TxHash>,
) -> Vec<Arc<ValidPoolTransaction<T::Transaction>>> {

View File

@@ -111,7 +111,7 @@ pub trait TransactionPool: Send + Sync + Clone {
/// Also removes all dependent transactions.
///
/// Consumer: Block production
fn remove_invalid(
fn remove_transactions(
&self,
hashes: impl IntoIterator<Item = TxHash>,
) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>;