mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Adds consistency checks for the HostConfiguration (#2087)
* Adds consistency checks for the `HostConfiguration` Besides that it fixes the chain specs to make the consistency checks happy. * Update runtime/parachains/src/configuration.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Review feedback and test fixes etc * Update * More * I'm an idiot * Fix tests... Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@ use crate::{
|
||||
};
|
||||
|
||||
/// Information about a session change that has just occurred.
|
||||
#[derive(Default, Clone)]
|
||||
#[derive(Clone)]
|
||||
pub struct SessionChangeNotification<BlockNumber> {
|
||||
/// The new validators in the session.
|
||||
pub validators: Vec<ValidatorId>,
|
||||
@@ -49,6 +49,19 @@ pub struct SessionChangeNotification<BlockNumber> {
|
||||
pub session_index: sp_staking::SessionIndex,
|
||||
}
|
||||
|
||||
impl<BlockNumber: Default + From<u32>> Default for SessionChangeNotification<BlockNumber> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
validators: Vec::new(),
|
||||
queued: Vec::new(),
|
||||
prev_config: HostConfiguration::default(),
|
||||
new_config: HostConfiguration::default(),
|
||||
random_seed: Default::default(),
|
||||
session_index: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode)]
|
||||
struct BufferedSessionChange<N> {
|
||||
apply_at: N,
|
||||
|
||||
Reference in New Issue
Block a user