Companion for upgrade of transaction-payment to pallet macro (#3267)

* update generic of storages

* update Substrate

* Remove unused import

* Remove unused import in test

Co-authored-by: parity-processbot <>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
Guillaume Thiolliere
2021-06-25 09:45:52 +02:00
committed by GitHub
parent 9e641ba187
commit 4a1d1b2de3
3 changed files with 159 additions and 160 deletions
+155 -154
View File
File diff suppressed because it is too large Load Diff
+2 -3
View File
@@ -18,7 +18,6 @@
use crate::*;
use frame_support::weights::WeightToFeePolynomial;
use frame_support::storage::StorageValue;
use sp_runtime::FixedPointNumber;
use frame_support::weights::GetDispatchInfo;
use parity_scale_codec::Encode;
@@ -88,12 +87,12 @@ fn transfer_cost_min_multiplier() {
let mut ext = sp_io::TestExternalities::new_empty();
let mut test_with_multiplier = |m| {
ext.execute_with(|| {
pallet_transaction_payment::NextFeeMultiplier::put(m);
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::put(m);
let fee = TransactionPayment::compute_fee(len, &info, 0);
println!(
"weight = {:?} // multiplier = {:?} // full transfer fee = {:?}",
info.weight.separated_string(),
pallet_transaction_payment::NextFeeMultiplier::get(),
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::get(),
fee.separated_string(),
);
});
+2 -3
View File
@@ -1437,7 +1437,6 @@ sp_api::impl_runtime_apis! {
mod test_fees {
use super::*;
use frame_support::weights::WeightToFeePolynomial;
use frame_support::storage::StorageValue;
use sp_runtime::FixedPointNumber;
use frame_support::weights::GetDispatchInfo;
use parity_scale_codec::Encode;
@@ -1488,12 +1487,12 @@ mod test_fees {
let mut ext = sp_io::TestExternalities::new_empty();
let mut test_with_multiplier = |m| {
ext.execute_with(|| {
pallet_transaction_payment::NextFeeMultiplier::put(m);
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::put(m);
let fee = TransactionPayment::compute_fee(len, &info, 0);
println!(
"weight = {:?} // multiplier = {:?} // full transfer fee = {:?}",
info.weight.separated_string(),
pallet_transaction_payment::NextFeeMultiplier::get(),
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::get(),
fee.separated_string(),
);
});