mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 03:35:43 +00:00
bounding staking: BoundedElectionProvider trait (#12362)
* add a bounded election provider trait * extract common trait election provider base * fmt * only bound the outer support vector * fix tests * docs * fix rust docs * fmt * fix rustdocs * docs * improve docs * small doc change
This commit is contained in:
@@ -297,7 +297,7 @@ impl onchain::Config for OnChainSeqPhragmen {
|
||||
}
|
||||
|
||||
pub struct MockFallback;
|
||||
impl ElectionProvider for MockFallback {
|
||||
impl ElectionProviderBase for MockFallback {
|
||||
type AccountId = AccountId;
|
||||
type BlockNumber = u64;
|
||||
type Error = &'static str;
|
||||
@@ -306,7 +306,8 @@ impl ElectionProvider for MockFallback {
|
||||
fn ongoing() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
}
|
||||
impl ElectionProvider for MockFallback {
|
||||
fn elect() -> Result<Supports<AccountId>, Self::Error> {
|
||||
Self::elect_with_bounds(Bounded::max_value(), Bounded::max_value())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user