pallet-staking: Reorg migration, pallet and pallet impls (#9410)

* Reorg migration and pallet and pallet impls

* Fix imports in untouched modules

* Add file headers

* Add header for migrations

* Improve comment

* Move OnOffenceHandler impl for Pallet to impl.rs

* fmt
This commit is contained in:
Zeke Mostov
2021-07-27 16:23:01 -07:00
committed by GitHub
parent 4fe55f0bcb
commit c5be63ce6d
9 changed files with 2794 additions and 2679 deletions
+10 -3
View File
@@ -18,10 +18,12 @@
//! Tests for the module.
use super::{Event, *};
use frame_election_provider_support::Support;
use frame_election_provider_support::{ElectionProvider, Support};
use frame_support::{
assert_noop, assert_ok,
traits::{Currency, OnInitialize, ReservableCurrency},
dispatch::WithPostDispatchInfo,
pallet_prelude::*,
traits::{Currency, Get, OnInitialize, ReservableCurrency},
weights::{extract_actual_weight, GetDispatchInfo},
};
use mock::*;
@@ -29,8 +31,13 @@ use pallet_balances::Error as BalancesError;
use sp_runtime::{
assert_eq_error_rate,
traits::{BadOrigin, Dispatchable},
Perbill, Percent,
};
use sp_staking::offence::OffenceDetails;
use sp_staking::{
offence::{OffenceDetails, OnOffenceHandler},
SessionIndex,
};
use sp_std::prelude::*;
use substrate_test_utils::assert_eq_uvec;
#[test]