fix get_latest_blockhash

This commit is contained in:
aniketfuryrocks 2023-02-05 14:29:25 +05:30
parent 2ec0fc06af
commit 819724c360
No known key found for this signature in database
GPG Key ID: FA6BFCFAA7D4B764
2 changed files with 3 additions and 2 deletions

View File

@ -60,9 +60,9 @@ impl BlockStore {
pub fn get_latest_blockhash(&self, commitment_config: CommitmentConfig) -> Arc<RwLock<String>> {
if commitment_config.is_finalized() {
self.latest_confirmed_blockhash.clone()
} else {
self.latest_finalized_blockhash.clone()
} else {
self.latest_confirmed_blockhash.clone()
}
}

View File

@ -75,6 +75,7 @@ impl LiteBridge {
}
/// List for `JsonRpc` requests
#[allow(clippy::too_many_arguments)]
pub async fn start_services<T: ToSocketAddrs + std::fmt::Debug + 'static + Send + Clone>(
mut self,
http_addr: T,