Replace best_* with finalized_*

We test their equivalency yet still better to use finalized_* in 
general.
This commit is contained in:
Luke Parker
2022-10-30 11:13:47 -04:00
parent c0056643c8
commit 503adfee2f
3 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ struct TendermintValidatorsStruct {
impl TendermintValidatorsStruct {
fn from_module<T: TendermintClient>(client: &Arc<T::Client>) -> TendermintValidatorsStruct {
let last = client.info().best_hash;
let last = client.info().finalized_hash;
let api = client.runtime_api();
let session = api.current_session(&BlockId::Hash(last)).unwrap();
let validators = api.validators(&BlockId::Hash(last)).unwrap();
@@ -63,7 +63,7 @@ impl<T: TendermintClient> Refresh<T> {
self
.client
.runtime_api()
.current_session(&BlockId::Hash(self.client.info().best_hash))
.current_session(&BlockId::Hash(self.client.info().finalized_hash))
.unwrap()
{
*self._refresh.write().unwrap() = TendermintValidatorsStruct::from_module::<T>(&self.client);