fn is_missing(id: &Pubkey, idx: u64, window_slot: &mut Option<SharedBlob>, c_or_d: &str) -> bool {
    if let Some(blob) = window_slot.take() {
        let blob_idx = blob.read().unwrap().index().unwrap();
        if blob_idx == idx {
            trace!("recover {}: idx: {} good {}", id, idx, c_or_d);
            // put it back
            mem::replace(window_slot, Some(blob));
            false
        } else {
            trace!(
                "recover {}: idx: {} old {} {}, recycling",
                id,
                idx,
                c_or_d,
                blob_idx,
            );
            true
        }
    } else {
        trace!("recover {}: idx: {} None {}", id, idx, c_or_d);
        // nothing there
        true
    }
}
// examine the window slot at idx returns
//  true if slot is empty
//  true if slot is stale (i.e. has the wrong index), old blob is flushed
//  false if slot has a blob with the right index
examine the window slot at idx returns
true if slot is empty
true if slot is stale , old blob is flushed
false if slot has a blob with the right index
examine the window slot at idx returns true if slot is empty true if slot is stale old blob is flushed false if slot has a blob with the right index
fn is_missing(id: &Pubkey, idx: u64, window_slot: &mut Option<SharedBlob>, c_or_d: &str) -> bool {
    if let Some(blob) = window_slot.take() {
        let blob_idx = blob.read().unwrap().index().unwrap();
        if blob_idx == idx {
            trace!("recover {}: idx: {} good {}", id, idx, c_or_d);
            // put it back
            mem::replace(window_slot, Some(blob));
            false
        } else {
            trace!(
                "recover {}: idx: {} old {} {}, recycling",
                id,
                idx,
                c_or_d,
                blob_idx,
            );
            true
        }
    } else {
        trace!("recover {}: idx: {} None {}", id, idx, c_or_d);
        // nothing there
        true
    }
}
fn is_missing ( id : & Pubkey , idx : u64 , window_slot : & mut Option < SharedBlob > , c_or_d : & str ) -> bool { if let Some ( blob ) = window_slot . take ( ) { let blob_idx = blob . read ( ) . unwrap ( ) . index ( ) . unwrap ( ) ; if blob_idx == idx { trace ! ( " " id idx c_or_d ) ; // put it back mem :: replace ( window_slot , Some ( blob ) ) ; false } else { trace ! ( " " id idx c_or_d blob_idx ) ; true } } else { trace ! ( " " id idx c_or_d ) ; // nothing there true } }
examine the window slot at idx returns
true if slot is empty
true if slot is stale (i.e.
examine the window slot at idx returns true if slot is empty true if slot is stale ( i . e .
id
&Pubkey
idx
u64
window_slot
&mut Option<SharedBlob>
c_or_d
&str
id
&Pubkey
idx
u64
window_slot
&mut Option<SharedBlob>
c_or_d
&str