mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +00:00
Expose some of the staking miner types over metadata (#12245)
* Expose some of the staking miner types over metadata * Update frame/election-provider-multi-phase/src/lib.rs Co-authored-by: Emily Ostbo <47109040+EmilyOstbo@users.noreply.github.com> Co-authored-by: Emily Ostbo <47109040+EmilyOstbo@users.noreply.github.com>
This commit is contained in:
@@ -708,6 +708,25 @@ pub mod pallet {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
|
||||
// Expose miner configs over the metadata such that they can be re-implemented.
|
||||
#[pallet::extra_constants]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::constant_name(MinerMaxLength)]
|
||||
fn max_length() -> u32 {
|
||||
<T::MinerConfig as MinerConfig>::MaxLength::get()
|
||||
}
|
||||
|
||||
#[pallet::constant_name(MinerMaxWeight)]
|
||||
fn max_weight() -> Weight {
|
||||
<T::MinerConfig as MinerConfig>::MaxWeight::get()
|
||||
}
|
||||
|
||||
#[pallet::constant_name(MinerMaxVotesPerVoter)]
|
||||
fn max_votes_per_voter() -> u32 {
|
||||
<T::MinerConfig as MinerConfig>::MaxVotesPerVoter::get()
|
||||
}
|
||||
}
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
|
||||
fn on_initialize(now: T::BlockNumber) -> Weight {
|
||||
|
||||
Reference in New Issue
Block a user