Migrate pallet-session to the new pallet macro (#9796)

* Migrate pallet-session to the new pallet macro

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove old macros

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen
2021-09-28 11:12:57 +08:00
committed by GitHub
parent 6ec82c7a83
commit 7f550d6dd2
15 changed files with 314 additions and 266 deletions
+4 -4
View File
@@ -1,11 +1,11 @@
# Session Module
# Session Pallet
The Session module allows validators to manage their session keys, provides a function for changing
the session length, and handles session rotation.
- [`session::Trait`](https://docs.rs/pallet-session/latest/pallet_session/trait.Config.html)
- [`Call`](https://docs.rs/pallet-session/latest/pallet_session/enum.Call.html)
- [`Module`](https://docs.rs/pallet-session/latest/pallet_session/struct.Module.html)
- [`Pallet`](https://docs.rs/pallet-session/latest/pallet_session/struct.Pallet.html)
## Overview
@@ -72,11 +72,11 @@ The [Staking pallet](https://docs.rs/pallet-staking/latest/pallet_staking/) uses
use pallet_session as session;
fn validators<T: pallet_session::Config>() -> Vec<<T as pallet_session::Config>::ValidatorId> {
<pallet_session::Module<T>>::validators()
<pallet_session::Pallet<T>>::validators()
}
```
## Related Modules
## Related Pallets
- [Staking](https://docs.rs/pallet-staking/latest/pallet_staking/)