Clean up extra_constant renaming. (#10935)

Co-authored-by: Xiankun Cheng <xiankuncheng@Xiankuns-MacBook-Pro-2.local>
This commit is contained in:
Xiankun Cheng
2022-03-01 22:32:22 +13:00
committed by GitHub
parent e3377ddc4e
commit 4e2f2ef278
2 changed files with 4 additions and 6 deletions
@@ -297,10 +297,9 @@ pub mod pallet {
#[pallet::extra_constants] #[pallet::extra_constants]
impl<T: Config> Pallet<T> { impl<T: Config> Pallet<T> {
// TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed. #[pallet::constant_name(WeightToFee)]
#[allow(non_snake_case)]
/// The polynomial that is applied in order to derive fee from weight. /// 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() T::WeightToFee::polynomial().to_vec()
} }
} }
+2 -3
View File
@@ -171,9 +171,8 @@ pub mod pallet {
#[pallet::extra_constants] #[pallet::extra_constants]
impl<T: Config> Pallet<T> { impl<T: Config> Pallet<T> {
// TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed. #[pallet::constant_name(MaxVestingSchedules)]
#[allow(non_snake_case)] fn max_vesting_schedules() -> u32 {
fn MaxVestingSchedules() -> u32 {
T::MAX_VESTING_SCHEDULES T::MAX_VESTING_SCHEDULES
} }
} }