Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Clean up extra_constant renaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiankun Cheng authored and Xiankun Cheng committed Mar 1, 2022
1 parent bfc6fb4 commit d61b755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions frame/transaction-payment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,9 @@ pub mod pallet {

#[pallet::extra_constants]
impl<T: Config> Pallet<T> {
// TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed.
#[allow(non_snake_case)]
#[pallet::constant_name(WeightToFee)]
/// The polynomial that is applied in order to derive fee from weight.
fn WeightToFee() -> Vec<WeightToFeeCoefficient<BalanceOf<T>>> {
fn weight_to_fee_polynomial() -> Vec<WeightToFeeCoefficient<BalanceOf<T>>> {
T::WeightToFee::polynomial().to_vec()
}
}
Expand Down
5 changes: 2 additions & 3 deletions frame/vesting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ pub mod pallet {

#[pallet::extra_constants]
impl<T: Config> Pallet<T> {
// TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed.
#[allow(non_snake_case)]
fn MaxVestingSchedules() -> u32 {
#[pallet::constant_name(MaxVestingSchedules)]
fn max_vesting_schedules() -> u32 {
T::MAX_VESTING_SCHEDULES
}
}
Expand Down

0 comments on commit d61b755

Please sign in to comment.