pub fn build_crds_filter(&self, crds: &Crds) -> Bloom<Hash> {
        let num = cmp::max(
            CRDS_GOSSIP_BLOOM_SIZE,
            crds.table.values().count() + self.purged_values.len(),
        );
        let mut bloom = Bloom::random(num, 0.1, 4 * 1024 * 8 - 1);
        for v in crds.table.values() {
            bloom.add(&v.value_hash);
        }
        for (value_hash, _insert_timestamp) in &self.purged_values {
            bloom.add(value_hash);
        }
        bloom
    }
/// build a filter of the current crds table
build a filter of the current crds table
build a filter of the current crds table
pub fn build_crds_filter(&self, crds: &Crds) -> Bloom<Hash> {
        let num = cmp::max(
            CRDS_GOSSIP_BLOOM_SIZE,
            crds.table.values().count() + self.purged_values.len(),
        );
        let mut bloom = Bloom::random(num, 0.1, 4 * 1024 * 8 - 1);
        for v in crds.table.values() {
            bloom.add(&v.value_hash);
        }
        for (value_hash, _insert_timestamp) in &self.purged_values {
            bloom.add(value_hash);
        }
        bloom
    }
pub fn build_crds_filter ( & self , crds : & Crds ) -> Bloom < Hash > { let num = cmp :: max ( CRDS_GOSSIP_BLOOM_SIZE , crds . table . values ( ) . count ( ) + self . purged_values . len ( ) , ) ; let mut bloom = Bloom :: random ( num , 0.1 , 4 * 1024 * 8 - 1 ) ; for v in crds . table . values ( ) { bloom . add ( & v . value_hash ) ; } for ( value_hash , _insert_timestamp ) in & self . purged_values { bloom . add ( value_hash ) ; } bloom }
build a filter of the current crds table
build a filter of the current crds table
&self
crds
&Crds
&self
crds
&Crds