-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[Enhancement] Convert fast-unstake to use StakingInterface, decouplin… #12424
Changes from 4 commits
3a11e89
4f39589
9b8e123
25520d6
ad90903
89b32b5
f51c073
41d04ad
7fc52f8
d3958ba
2ff689c
1fc6510
28d15d7
0705029
39cf580
8093567
30a5882
37107ef
097a9d1
613a701
e785dd5
03586d7
20a4f29
9807cf2
3639af8
b7827d5
5232b99
f881456
c3cee71
068c565
ff36f90
6f862e4
bff58a4
bdb525e
4bd57b1
f6040ec
8c5604d
731fab2
b90082a
1eee8a5
1f4fad2
27530dc
90cec9f
b1560aa
75a36bb
b3e843e
963837b
cbed2f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,6 +135,23 @@ pub trait StakingInterface { | |
| num_slashing_spans: u32, | ||
| ) -> Result<bool, DispatchError>; | ||
|
|
||
| /// Get `StakingLedger` by controller account. | ||
| fn get_ledger(ctrl: &Self::AccountId) -> StakingLedger<Self>; | ||
|
||
|
|
||
| /// The ideal number of active validators. | ||
kianenigma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| fn validator_count() -> u32; | ||
|
|
||
| /// Whether or not there is an ongoing election. | ||
| fn ongoing() -> bool; | ||
|
|
||
| /// Force a current staker to become completely unstaked, immediately. | ||
| fn force_unstake(stash: T::AccountId) -> DispatchResult; | ||
|
|
||
| /// Checks whether an account `staker` has been exposed in an era. | ||
| /// TODO: shall we have this helper here or just expose ErasStakers | ||
|
||
| /// storage instead for the caller to do as they please? | ||
| fn is_exposed_in_era(staker: &T::AccountId, era: &EraIndex) -> bool; | ||
|
||
|
|
||
| /// Get the nominations of a stash, if they are a nominator, `None` otherwise. | ||
| #[cfg(feature = "runtime-benchmarks")] | ||
| fn nominations(who: Self::AccountId) -> Option<sp_std::prelude::Vec<Self::AccountId>>; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.