mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 16:51:03 +00:00
Implement set_keys
This is needed for Ledgeracio.
This commit is contained in:
@@ -22,6 +22,10 @@ use crate::frame::system::{
|
||||
};
|
||||
use codec::Encode;
|
||||
use frame_support::Parameter;
|
||||
use sp_runtime::traits::{
|
||||
Member,
|
||||
OpaqueKeys,
|
||||
};
|
||||
use std::{
|
||||
fmt::Debug,
|
||||
marker::PhantomData,
|
||||
@@ -36,6 +40,9 @@ pub trait Session: System {
|
||||
|
||||
/// The validator account identifier type for the runtime.
|
||||
type SessionIndex: Parameter + Debug + Ord + Default + Send + Sync + 'static;
|
||||
|
||||
/// The keys.
|
||||
type Keys: OpaqueKeys + Member + Parameter + Default;
|
||||
}
|
||||
|
||||
/// The current set of validators.
|
||||
@@ -62,3 +69,12 @@ pub struct QueuedChangedStore<T: Session> {
|
||||
/// Marker for the runtime
|
||||
pub _runtime: PhantomData<T>,
|
||||
}
|
||||
|
||||
/// The current set of validators.
|
||||
#[derive(Encode, Call)]
|
||||
pub struct SetKeysCall<T: Session> {
|
||||
/// The keys
|
||||
pub keys: T::Keys,
|
||||
/// The proof. This is not currently used and can be set to an empty vector.
|
||||
pub proof: Vec<u8>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user