mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-13 06:29:25 +00:00
Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in general.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user