pub fn sync<T: BlockTree>(&mut self, tree: &T, time: LocalTime) {
        let filter_height = self.filters.height();
        let block_height = tree.height();

        if filter_height < block_height {
            // We need to sync the filter header chain.
            let start_height = self.filters.height() + 1;
            let stop_height = tree.height();

            if let Some((peer, start_height, stop_hash)) =
                self.send_getcfheaders(start_height..stop_height + 1, tree, time)
            {
                self.upstream.event(Event::Syncing {
                    peer,
                    start_height,
                    stop_hash,
                });
            }
        } else if filter_height > block_height {
            panic!("SpvManager::idle: filter chain is longer than header chain!");
        }
    }
/// Attempt to sync the filter header chain.
Attempt to sync the filter header chain.
Attempt to sync the filter header chain .
pub fn sync<T: BlockTree>(&mut self, tree: &T, time: LocalTime) {
        let filter_height = self.filters.height();
        let block_height = tree.height();
        if filter_height < block_height {
            // We need to sync the filter header chain.
            let start_height = self.filters.height() + 1;
            let stop_height = tree.height();
            if let Some((peer, start_height, stop_hash)) =
                self.send_getcfheaders(start_height..stop_height + 1, tree, time)
            {
                self.upstream.event(Event::Syncing {
                    peer,
                    start_height,
                    stop_hash,
                });
            }
        } else if filter_height > block_height {
            panic!("SpvManager::idle: filter chain is longer than header chain!");
        }
    }
pub fn sync < T : BlockTree > ( & mut self , tree : & T , time : LocalTime ) { let filter_height = self . filters . height ( ) ; let block_height = tree . height ( ) ; if filter_height < block_height { // We need to sync the filter header chain. let start_height = self . filters . height ( ) + 1 ; let stop_height = tree . height ( ) ; if let Some ( ( peer , start_height , stop_hash ) ) = self . send_getcfheaders ( start_height .. stop_height + 1 , tree , time ) { self . upstream . event ( Event :: Syncing { peer , start_height , stop_hash , } ) ; } } else if filter_height > block_height { panic ! ( " " ) ; } }
Attempt to sync the filter header chain.
Attempt to sync the filter header chain .
&mut self
tree
&T
time
LocalTime