mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 22:27:56 +00:00
Make Staking pallet using a proper Time module. (#4662)
* add new trait, still migration to make * Apply suggestions from code review Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * implement migration * better naming * fix test * no longer require DeprecatedTime * add test * fix version * upgrade only from kusama * add test * fix test * Update frame/timestamp/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -21,9 +21,8 @@ use mock::*;
|
||||
use sp_runtime::{assert_eq_error_rate, traits::BadOrigin};
|
||||
use sp_staking::offence::OffenceDetails;
|
||||
use frame_support::{
|
||||
assert_ok, assert_noop,
|
||||
assert_ok, assert_noop, StorageMap,
|
||||
traits::{Currency, ReservableCurrency, OnInitialize},
|
||||
StorageMap,
|
||||
};
|
||||
use pallet_balances::Error as BalancesError;
|
||||
use substrate_test_utils::assert_eq_uvec;
|
||||
@@ -3039,3 +3038,11 @@ fn set_history_depth_works() {
|
||||
assert!(!<Staking as Store>::ErasTotalStake::contains_key(10 - 5));
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn assert_migration_is_noop() {
|
||||
let kusama_active_era = "4a0200000190e2721171010000";
|
||||
let era = ActiveEraInfo::decode(&mut &hex::decode(kusama_active_era).unwrap()[..]).unwrap();
|
||||
assert_eq!(era.index, 586);
|
||||
assert_eq!(era.start, Some(1585135674000));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user