Unverified Commit d5028035 authored by thiolliere's avatar thiolliere Committed by GitHub
Browse files

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's avatarKeith Yeung <kungfukeith11@gmail.com>
parent a6d646b2
Pipeline #144282 passed with stages
in 33 minutes and 6 seconds
This diff is collapsed.
......@@ -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(),
);
});
......
......@@ -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(),
);
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment