fn read_my_gossiped_root(
        my_pubkey: &Pubkey,
        cluster_info: &Arc<RwLock<ClusterInfo>>,
        old_root: &mut u64,
    ) -> u64 {
        let new_root = cluster_info
            .read()
            .unwrap()
            .get_gossiped_root_for_node(&my_pubkey, None);

        if let Some(new_root) = new_root {
            *old_root = new_root;
            new_root
        } else {
            *old_root
        }
    }
// Read my root out of gossip, and update the cached `old_root`
Read my root out of gossip, and update the cached `old_root`
Read my root out of gossip and update the cached ` old_root `
fn read_my_gossiped_root(
        my_pubkey: &Pubkey,
        cluster_info: &Arc<RwLock<ClusterInfo>>,
        old_root: &mut u64,
    ) -> u64 {
        let new_root = cluster_info
            .read()
            .unwrap()
            .get_gossiped_root_for_node(&my_pubkey, None);
        if let Some(new_root) = new_root {
            *old_root = new_root;
            new_root
        } else {
            *old_root
        }
    }
fn read_my_gossiped_root ( my_pubkey : & Pubkey , cluster_info : & Arc < RwLock < ClusterInfo > > , old_root : & mut u64 , ) -> u64 { let new_root = cluster_info . read ( ) . unwrap ( ) . get_gossiped_root_for_node ( & my_pubkey , None ) ; if let Some ( new_root ) = new_root { * old_root = new_root ; new_root } else { * old_root } }
Read my root out of gossip, and update the cached `old_root`
Read my root out of gossip and update the cached ` old_root `
my_pubkey
&Pubkey
cluster_info
&Arc<RwLock<ClusterInfo>>
old_root
&mut u64
my_pubkey
&Pubkey
cluster_info
&Arc<RwLock<ClusterInfo>>
old_root
&mut u64