mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 04:41:04 +00:00
[Feature] Add deposit to fast-unstake (#12366)
* [Feature] Add deposit to fast-unstake * disable on ErasToCheckPerBlock == 0 * removed signed ext * remove obsolete import * remove some obsolete stuff * fix some comments * fixed all the comments * remove obsolete imports * fix some tests * CallNotAllowed tests * Update frame/fast-unstake/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * fix tests * fix deregister + tests * more fixes * make sure we go above existential deposit * fixed the last test * some nit fixes * fix node * fix bench * last bench fix * Update frame/fast-unstake/src/lib.rs * ".git/.scripts/fmt.sh" 1 Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: command-bot <>
This commit is contained in:
@@ -164,12 +164,13 @@ impl Convert<sp_core::U256, Balance> for U256ToBalance {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static SlashPerEra: u32 = 100;
|
||||
pub static DepositAmount: u128 = 7;
|
||||
}
|
||||
|
||||
impl fast_unstake::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type SlashPerEra = SlashPerEra;
|
||||
type Deposit = DepositAmount;
|
||||
type DepositCurrency = Balances;
|
||||
type ControlOrigin = frame_system::EnsureRoot<Self::AccountId>;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
@@ -213,11 +214,11 @@ impl Default for ExtBuilder {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
exposed_nominators: vec![
|
||||
(1, 2, 100),
|
||||
(3, 4, 100),
|
||||
(5, 6, 100),
|
||||
(7, 8, 100),
|
||||
(9, 10, 100),
|
||||
(1, 2, 7 + 100),
|
||||
(3, 4, 7 + 100),
|
||||
(5, 6, 7 + 100),
|
||||
(7, 8, 7 + 100),
|
||||
(9, 10, 7 + 100),
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -270,8 +271,8 @@ impl ExtBuilder {
|
||||
.into_iter()
|
||||
.map(|(_, ctrl, balance)| (ctrl, balance * 2)),
|
||||
)
|
||||
.chain(validators_range.clone().map(|x| (x, 100)))
|
||||
.chain(nominators_range.clone().map(|x| (x, 100)))
|
||||
.chain(validators_range.clone().map(|x| (x, 7 + 100)))
|
||||
.chain(nominators_range.clone().map(|x| (x, 7 + 100)))
|
||||
.collect::<Vec<_>>(),
|
||||
}
|
||||
.assimilate_storage(&mut storage);
|
||||
|
||||
Reference in New Issue
Block a user