mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Introduce WeightToFee trait instead of WeightToFeePolynomial and make WeightToFeePolynomial implement it instead (#11415)
* Introduce `WeightToFee` trait instead of `WeightToFeePolynomial` and make `WeightToFeePolynomial` implement it instead * Rename `WeightToFee::calc()` to `WeightToFee::wight_to_fee()` * Fix typo
This commit is contained in:
@@ -59,7 +59,7 @@ mod multiplier_tests {
|
||||
AdjustmentVariable, MinimumMultiplier, Runtime, RuntimeBlockWeights as BlockWeights,
|
||||
System, TargetBlockFullness, TransactionPayment,
|
||||
};
|
||||
use frame_support::weights::{DispatchClass, Weight, WeightToFeePolynomial};
|
||||
use frame_support::weights::{DispatchClass, Weight, WeightToFee};
|
||||
|
||||
fn max_normal() -> Weight {
|
||||
BlockWeights::get()
|
||||
@@ -234,7 +234,9 @@ mod multiplier_tests {
|
||||
fm = next;
|
||||
iterations += 1;
|
||||
let fee =
|
||||
<Runtime as pallet_transaction_payment::Config>::WeightToFee::calc(&tx_weight);
|
||||
<Runtime as pallet_transaction_payment::Config>::WeightToFee::weight_to_fee(
|
||||
&tx_weight,
|
||||
);
|
||||
let adjusted_fee = fm.saturating_mul_acc_int(fee);
|
||||
println!(
|
||||
"iteration {}, new fm = {:?}. Fee at this point is: {} units / {} millicents, \
|
||||
|
||||
Reference in New Issue
Block a user