mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 02:57:58 +00:00
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:
committed by
GitHub
parent
9e641ba187
commit
4a1d1b2de3
Generated
+155
-154
File diff suppressed because it is too large
Load Diff
@@ -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(),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user