Add get_next_last_id
This commit is contained in:
		@@ -262,6 +262,19 @@ impl ThinClient {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Request a new last Entry ID from the server. This method blocks
 | 
			
		||||
    /// until the server sends a response.
 | 
			
		||||
    pub fn get_next_last_id(&mut self, previous_last_id: &Hash) -> Hash {
 | 
			
		||||
        loop {
 | 
			
		||||
            let last_id = self.get_last_id();
 | 
			
		||||
            if last_id != *previous_last_id {
 | 
			
		||||
                break last_id;
 | 
			
		||||
            }
 | 
			
		||||
            debug!("Got same last_id ({:?}), will retry...", last_id);
 | 
			
		||||
            sleep(Duration::from_millis(100));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub fn submit_poll_balance_metrics(elapsed: &Duration) {
 | 
			
		||||
        solana_metrics::submit(
 | 
			
		||||
            influxdb::Point::new("thinclient")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user