Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a8e8ea2
Conpanion for Substrate#7127
liuchengxu Oct 28, 2020
a681c0f
Use sp_session::OneSessionHandler
liuchengxu Oct 28, 2020
7c865a0
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Oct 31, 2020
efd919f
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Nov 2, 2020
de14c50
Merge branch 'sub-7127' of https://github.com/liuchengxu/polkadot int…
liuchengxu Nov 2, 2020
d7775e1
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Nov 3, 2020
f44cc19
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Nov 9, 2020
269128a
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Jan 14, 2021
e1a79a3
.
liuchengxu Jan 14, 2021
6e309ef
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Jan 20, 2021
54b895f
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Jan 21, 2021
08c14e7
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Feb 1, 2021
03d963d
Merge branch 'sub-7127' of https://github.com/liuchengxu/polkadot int…
liuchengxu Feb 1, 2021
2a6cbea
Fix pallet_session::OneSessionHandler
liuchengxu Feb 2, 2021
748527d
OneSessionHandler is in frame_support now
liuchengxu Feb 2, 2021
f31d9a8
Merge branch 'master' of https://github.com/paritytech/polkadot into …
liuchengxu Feb 2, 2021
72e7fa4
"Update Substrate"
Feb 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 140 additions & 140 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use primitives::v1::{BlockNumber, ValidatorId, AssignmentId};
use sp_runtime::{Perquintill, Perbill, FixedPointNumber};
use frame_system::limits;
use frame_support::{
parameter_types, traits::{Currency},
parameter_types, traits::{Currency, OneSessionHandler},
weights::{Weight, constants::WEIGHT_PER_SECOND, DispatchClass},
};
use pallet_transaction_payment::{TargetedFeeAdjustment, Multiplier};
Expand Down Expand Up @@ -136,8 +136,7 @@ impl<T> sp_runtime::BoundToRuntimeAppPublic for ParachainSessionKeyPlaceholder<T
type Public = ValidatorId;
}

impl<T: pallet_session::Config>
pallet_session::OneSessionHandler<T::AccountId> for ParachainSessionKeyPlaceholder<T>
impl<T: pallet_session::Config> OneSessionHandler<T::AccountId> for ParachainSessionKeyPlaceholder<T>
{
type Key = ValidatorId;

Expand Down Expand Up @@ -165,8 +164,7 @@ impl<T> sp_runtime::BoundToRuntimeAppPublic for AssignmentSessionKeyPlaceholder<
type Public = AssignmentId;
}

impl<T: pallet_session::Config>
pallet_session::OneSessionHandler<T::AccountId> for AssignmentSessionKeyPlaceholder<T>
impl<T: pallet_session::Config> OneSessionHandler<T::AccountId> for AssignmentSessionKeyPlaceholder<T>
{
type Key = AssignmentId;

Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/paras_registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ mod tests {
};
use keyring::Sr25519Keyring;
use runtime_parachains::{initializer, configuration, inclusion, session_info, scheduler, dmp, ump, hrmp};
use pallet_session::OneSessionHandler;
use frame_support::traits::OneSessionHandler;

impl_outer_origin! {
pub enum Origin for Test {
Expand Down
1 change: 1 addition & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ parameter_types! {
impl pallet_im_online::Config for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type ValidatorSet = Historical;
type ReportUnresponsiveness = Offences;
type SessionDuration = SessionDuration;
type UnsignedPriority = ImOnlineUnsignedPriority;
Expand Down
4 changes: 2 additions & 2 deletions runtime/parachains/src/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use sp_std::prelude::*;
use frame_support::weights::Weight;
use primitives::v1::ValidatorId;
use frame_support::{
decl_storage, decl_module, decl_error, traits::Randomness,
decl_storage, decl_module, decl_error, traits::{OneSessionHandler, Randomness},
};
use parity_scale_codec::{Encode, Decode};
use crate::{
Expand Down Expand Up @@ -237,7 +237,7 @@ impl<T: Config> sp_runtime::BoundToRuntimeAppPublic for Module<T> {
type Public = ValidatorId;
}

impl<T: pallet_session::Config + Config> pallet_session::OneSessionHandler<T::AccountId> for Module<T> {
impl<T: pallet_session::Config + Config> OneSessionHandler<T::AccountId> for Module<T> {
type Key = ValidatorId;

fn on_genesis_session<'a, I: 'a>(_validators: I)
Expand Down
4 changes: 2 additions & 2 deletions runtime/parachains/src/session_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use primitives::v1::{AssignmentId, AuthorityDiscoveryId, SessionIndex, SessionInfo};
use frame_support::{
decl_storage, decl_module, decl_error,
weights::Weight,
traits::OneSessionHandler, weights::Weight,
};
use crate::{configuration, paras, scheduler};
use sp_std::vec::Vec;
Expand Down Expand Up @@ -141,7 +141,7 @@ impl<T: Config> sp_runtime::BoundToRuntimeAppPublic for Module<T> {
type Public = AssignmentId;
}

impl<T: pallet_session::Config + Config> pallet_session::OneSessionHandler<T::AccountId> for Module<T> {
impl<T: pallet_session::Config + Config> OneSessionHandler<T::AccountId> for Module<T> {
type Key = AssignmentId;

fn on_genesis_session<'a, I: 'a>(_validators: I)
Expand Down
1 change: 1 addition & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ parameter_types! {
impl pallet_im_online::Config for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type ValidatorSet = Historical;
type SessionDuration = SessionDuration;
type ReportUnresponsiveness = Offences;
type UnsignedPriority = ImOnlineUnsignedPriority;
Expand Down
1 change: 1 addition & 0 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ parameter_types! {
impl pallet_im_online::Config for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type ValidatorSet = Historical;
type ReportUnresponsiveness = Offences;
type SessionDuration = SessionDuration;
type UnsignedPriority = StakingUnsignedPriority;
Expand Down
1 change: 1 addition & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ parameter_types! {
impl pallet_im_online::Config for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type ValidatorSet = Historical;
type ReportUnresponsiveness = Offences;
type SessionDuration = SessionDuration;
type UnsignedPriority = StakingUnsignedPriority;
Expand Down