mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-08-06 10:45:51 +00:00
migrate alliance, fast-unstake and bags list to use derive-impl (#1636)
Moving a few pallets to the latest and greatest `derive_impl` to give it a try. Part of #171 --------- Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -163,7 +163,7 @@ mod pallet {
|
||||
|
||||
assert_eq!(Bag::<Runtime>::get(10).unwrap(), Bag::new(Some(1), Some(3), 10));
|
||||
assert_eq!(Bag::<Runtime>::get(1_000).unwrap(), Bag::new(Some(2), Some(2), 1_000));
|
||||
assert_eq!(get_list_as_ids(), vec![2u32, 1, 4, 3]);
|
||||
assert_eq!(get_list_as_ids(), vec![2u64, 1, 4, 3]);
|
||||
|
||||
// when
|
||||
StakingMock::set_score_of(&2, 10);
|
||||
@@ -272,10 +272,10 @@ mod pallet {
|
||||
// given
|
||||
assert_eq!(List::<Runtime>::get_bags(), vec![(20, vec![10, 11, 12])]);
|
||||
// 11 now has more weight than 10 and can be moved before it.
|
||||
StakingMock::set_score_of(&11u32, 17);
|
||||
StakingMock::set_score_of(&11u64, 17);
|
||||
|
||||
// when
|
||||
assert_ok!(BagsList::put_in_front_of_other(RuntimeOrigin::signed(42), 11u32, 10));
|
||||
assert_ok!(BagsList::put_in_front_of_other(RuntimeOrigin::signed(42), 11u64, 10));
|
||||
|
||||
// then
|
||||
assert_eq!(List::<Runtime>::get_bags(), vec![(20, vec![11, 10, 12])]);
|
||||
|
||||
Reference in New Issue
Block a user