pub(crate) fn update_record_timestamp(&mut self, pubkey: &Pubkey, now: u64) {
        // It suffices to only overwrite the origin's timestamp since that is
        // used when purging old values. If the origin does not exist in the
        // table, fallback to exhaustive update on all associated records.
        let origin = CrdsValueLabel::ContactInfo(*pubkey);
        if let Some(origin) = self.table.get_mut(&origin) {
            if origin.local_timestamp < now {
                origin.local_timestamp = now;
            }
        } else if let Some(indices) = self.records.get(pubkey) {
            for index in indices {
                let entry = self.table.index_mut(*index);
                if entry.local_timestamp < now {
                    entry.local_timestamp = now;
                }
            }
        }
    }
/// Update the timestamp's of all the labels that are associated with Pubkey
Update the timestamp's of all the labels that are associated with Pubkey
Update the timestamp ' s of all the labels that are associated with Pubkey
pub(crate) fn update_record_timestamp(&mut self, pubkey: &Pubkey, now: u64) {
        // It suffices to only overwrite the origin's timestamp since that is
        // used when purging old values. If the origin does not exist in the
        // table, fallback to exhaustive update on all associated records.
        let origin = CrdsValueLabel::ContactInfo(*pubkey);
        if let Some(origin) = self.table.get_mut(&origin) {
            if origin.local_timestamp < now {
                origin.local_timestamp = now;
            }
        } else if let Some(indices) = self.records.get(pubkey) {
            for index in indices {
                let entry = self.table.index_mut(*index);
                if entry.local_timestamp < now {
                    entry.local_timestamp = now;
                }
            }
        }
    }
pub ( crate ) fn update_record_timestamp ( & mut self , pubkey : & Pubkey , now : u64 ) { // It suffices to only overwrite the origin's timestamp since that is // used when purging old values. If the origin does not exist in the // table, fallback to exhaustive update on all associated records. let origin = CrdsValueLabel :: ContactInfo ( * pubkey ) ; if let Some ( origin ) = self . table . get_mut ( & origin ) { if origin . local_timestamp < now { origin . local_timestamp = now ; } } else if let Some ( indices ) = self . records . get ( pubkey ) { for index in indices { let entry = self . table . index_mut ( * index ) ; if entry . local_timestamp < now { entry . local_timestamp = now ; } } } }
Update the timestamp's of all the labels that are associated with Pubkey
Update the timestamp ' s of all the labels that are associated with Pubkey
&mut self
pubkey
&Pubkey
now
u64