Properly defer slashes (#11823)

* initial draft of fixing slashing

* fix test

* Update frame/staking/src/tests.rs

Co-authored-by: Piotr Mikołajczyk <piomiko41@gmail.com>

* last touches

* add more detail about unbonding

* add migration

* fmt

Co-authored-by: Piotr Mikołajczyk <piomiko41@gmail.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
Kian Paimani
2022-07-26 13:44:48 +01:00
committed by GitHub
parent 9f409dc0b8
commit ff2c4ca02f
6 changed files with 177 additions and 41 deletions
@@ -477,10 +477,6 @@ pub mod pallet {
ValueQuery,
>;
/// The earliest era for which we have a pending, unapplied slash.
#[pallet::storage]
pub(crate) type EarliestUnappliedSlash<T> = StorageValue<_, EraIndex>;
/// The last planned session scheduled by the session pallet.
///
/// This is basically in sync with the call to [`pallet_session::SessionManager::new_session`].