Struct solana_perf::sigverify::Deduper
source · pub struct Deduper<const K: usize, T: ?Sized> { /* private fields */ }
Implementations§
source§impl<const K: usize, T: ?Sized + Hash> Deduper<K, T>
impl<const K: usize, T: ?Sized + Hash> Deduper<K, T>
pub fn new<R: Rng>(rng: &mut R, num_bits: u64) -> Self
sourcepub fn maybe_reset<R: Rng>(
&mut self,
rng: &mut R,
false_positive_rate: f64,
reset_cycle: Duration
) -> bool
pub fn maybe_reset<R: Rng>( &mut self, rng: &mut R, false_positive_rate: f64, reset_cycle: Duration ) -> bool
Resets the Deduper if either it is older than the reset_cycle or it is saturated enough that false positive rate exceeds specified threshold. Returns true if the deduper was saturated.