mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Correct the check for if we still need to set keys
The prior check had an edge case where once keys were pruned, it'd believe the keys needed to be set ad infinitum.
This commit is contained in:
@@ -2,7 +2,7 @@ use sp_core::sr25519::{Public, Signature};
|
||||
|
||||
use serai_runtime::{validator_sets, ValidatorSets, Runtime};
|
||||
pub use validator_sets::primitives;
|
||||
use primitives::{ValidatorSet, KeyPair};
|
||||
use primitives::{Session, ValidatorSet, KeyPair};
|
||||
|
||||
use subxt::utils::Encoded;
|
||||
|
||||
@@ -31,6 +31,14 @@ impl Serai {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_session(
|
||||
&self,
|
||||
network: NetworkId,
|
||||
at_hash: [u8; 32],
|
||||
) -> Result<Option<Session>, SeraiError> {
|
||||
self.storage(PALLET, "CurrentSession", Some(vec![scale_value(network)]), at_hash).await
|
||||
}
|
||||
|
||||
pub async fn get_validator_set_participants(
|
||||
&self,
|
||||
network: NetworkId,
|
||||
|
||||
Reference in New Issue
Block a user