pub trait ShouldReplace<T> {
// Required method
fn should_replace(
&self,
old: &ReplaceTransaction<'_, T>,
new: &ReplaceTransaction<'_, T>,
) -> Choice;
}Expand description
Chooses whether a new transaction should replace an existing transaction if the pool is full.
Required Methods§
Sourcefn should_replace(
&self,
old: &ReplaceTransaction<'_, T>,
new: &ReplaceTransaction<'_, T>,
) -> Choice
fn should_replace( &self, old: &ReplaceTransaction<'_, T>, new: &ReplaceTransaction<'_, T>, ) -> Choice
Decides if new should push out old transaction from the pool.
NOTE returning InsertNew here can lead to some transactions being accepted above pool limits.