mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-12-03 07:47:05 +00:00
Pallet session new API (#4609)
* Initial work * Fix most things * fix test * fix old comment * migration * fix * remove useless stuff * fix * less spaghetti implementation * fix initial session * fix
This commit is contained in:
1 parent
b0d1a7183a
commit
164dec95e5
10 files changed
+159
-195
No files matched your search
@@ -109,26 +109,18 @@ mod tests {
|
||||
pub struct Test;
|
||||
impl Trait for Test {}
|
||||
|
||||
pub struct TestOnSessionEnding;
|
||||
impl pallet_session::OnSessionEnding<AuthorityId> for TestOnSessionEnding {
|
||||
fn on_session_ending(_: SessionIndex, _: SessionIndex) -> Option<Vec<AuthorityId>> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(33);
|
||||
}
|
||||
|
||||
impl pallet_session::Trait for Test {
|
||||
type OnSessionEnding = TestOnSessionEnding;
|
||||
type SessionManager = ();
|
||||
type Keys = UintAuthorityId;
|
||||
type ShouldEndSession = pallet_session::PeriodicSessions<Period, Offset>;
|
||||
type SessionHandler = TestSessionHandler;
|
||||
type Event = ();
|
||||
type ValidatorId = AuthorityId;
|
||||
type ValidatorIdOf = ConvertInto;
|
||||
type SelectInitialValidators = ();
|
||||
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user