mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 19:05:41 +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 crate::*;
|
||||||
use frame_support::weights::WeightToFeePolynomial;
|
use frame_support::weights::WeightToFeePolynomial;
|
||||||
use frame_support::storage::StorageValue;
|
|
||||||
use sp_runtime::FixedPointNumber;
|
use sp_runtime::FixedPointNumber;
|
||||||
use frame_support::weights::GetDispatchInfo;
|
use frame_support::weights::GetDispatchInfo;
|
||||||
use parity_scale_codec::Encode;
|
use parity_scale_codec::Encode;
|
||||||
@@ -88,12 +87,12 @@ fn transfer_cost_min_multiplier() {
|
|||||||
let mut ext = sp_io::TestExternalities::new_empty();
|
let mut ext = sp_io::TestExternalities::new_empty();
|
||||||
let mut test_with_multiplier = |m| {
|
let mut test_with_multiplier = |m| {
|
||||||
ext.execute_with(|| {
|
ext.execute_with(|| {
|
||||||
pallet_transaction_payment::NextFeeMultiplier::put(m);
|
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::put(m);
|
||||||
let fee = TransactionPayment::compute_fee(len, &info, 0);
|
let fee = TransactionPayment::compute_fee(len, &info, 0);
|
||||||
println!(
|
println!(
|
||||||
"weight = {:?} // multiplier = {:?} // full transfer fee = {:?}",
|
"weight = {:?} // multiplier = {:?} // full transfer fee = {:?}",
|
||||||
info.weight.separated_string(),
|
info.weight.separated_string(),
|
||||||
pallet_transaction_payment::NextFeeMultiplier::get(),
|
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::get(),
|
||||||
fee.separated_string(),
|
fee.separated_string(),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1437,7 +1437,6 @@ sp_api::impl_runtime_apis! {
|
|||||||
mod test_fees {
|
mod test_fees {
|
||||||
use super::*;
|
use super::*;
|
||||||
use frame_support::weights::WeightToFeePolynomial;
|
use frame_support::weights::WeightToFeePolynomial;
|
||||||
use frame_support::storage::StorageValue;
|
|
||||||
use sp_runtime::FixedPointNumber;
|
use sp_runtime::FixedPointNumber;
|
||||||
use frame_support::weights::GetDispatchInfo;
|
use frame_support::weights::GetDispatchInfo;
|
||||||
use parity_scale_codec::Encode;
|
use parity_scale_codec::Encode;
|
||||||
@@ -1488,12 +1487,12 @@ mod test_fees {
|
|||||||
let mut ext = sp_io::TestExternalities::new_empty();
|
let mut ext = sp_io::TestExternalities::new_empty();
|
||||||
let mut test_with_multiplier = |m| {
|
let mut test_with_multiplier = |m| {
|
||||||
ext.execute_with(|| {
|
ext.execute_with(|| {
|
||||||
pallet_transaction_payment::NextFeeMultiplier::put(m);
|
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::put(m);
|
||||||
let fee = TransactionPayment::compute_fee(len, &info, 0);
|
let fee = TransactionPayment::compute_fee(len, &info, 0);
|
||||||
println!(
|
println!(
|
||||||
"weight = {:?} // multiplier = {:?} // full transfer fee = {:?}",
|
"weight = {:?} // multiplier = {:?} // full transfer fee = {:?}",
|
||||||
info.weight.separated_string(),
|
info.weight.separated_string(),
|
||||||
pallet_transaction_payment::NextFeeMultiplier::get(),
|
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::get(),
|
||||||
fee.separated_string(),
|
fee.separated_string(),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user