mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 19:31:02 +00:00
* Companion for https://github.com/paritytech/substrate/pull/11415 * Rename `WeightToFee::calc()` to `WeightToFee::wight_to_fee()` * Fix typo * Fix compile errors * update lockfile for {"substrate"} Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -100,14 +100,14 @@ mod tests {
|
||||
fee::WeightToFee,
|
||||
};
|
||||
use crate::weights::ExtrinsicBaseWeight;
|
||||
use frame_support::weights::WeightToFeePolynomial;
|
||||
use frame_support::weights::WeightToFee as WeightToFeeT;
|
||||
use runtime_common::MAXIMUM_BLOCK_WEIGHT;
|
||||
|
||||
#[test]
|
||||
// Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds.
|
||||
fn full_block_fee_is_correct() {
|
||||
// A full block should cost between 10 and 100 DOLLARS.
|
||||
let full_block = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT);
|
||||
let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT);
|
||||
assert!(full_block >= 10 * DOLLARS);
|
||||
assert!(full_block <= 100 * DOLLARS);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ mod tests {
|
||||
fn extrinsic_base_fee_is_correct() {
|
||||
// `ExtrinsicBaseWeight` should cost 1/10 of a CENT
|
||||
println!("Base: {}", ExtrinsicBaseWeight::get());
|
||||
let x = WeightToFee::calc(&ExtrinsicBaseWeight::get());
|
||||
let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get());
|
||||
let y = CENTS / 10;
|
||||
assert!(x.max(y) - x.min(y) < MILLICENTS);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ use bridge_runtime_common::messages::{
|
||||
};
|
||||
use frame_support::{
|
||||
traits::Get,
|
||||
weights::{Weight, WeightToFeePolynomial},
|
||||
weights::{Weight, WeightToFee as WeightToFeeT},
|
||||
RuntimeDebug,
|
||||
};
|
||||
use rococo_runtime_constants::fee::WeightToFee;
|
||||
@@ -141,7 +141,7 @@ impl<B, GI> ThisChainWithMessages for RococoLikeChain<B, GI> {
|
||||
.base_extrinsic,
|
||||
crate::TransactionByteFee::get(),
|
||||
pallet_transaction_payment::Pallet::<Runtime>::next_fee_multiplier(),
|
||||
|weight| WeightToFee::calc(&weight),
|
||||
|weight| WeightToFee::weight_to_fee(&weight),
|
||||
transaction,
|
||||
)
|
||||
}
|
||||
@@ -199,7 +199,7 @@ impl<B, GI> BridgedChainWithMessages for RococoLikeChain<B, GI> {
|
||||
.base_extrinsic,
|
||||
crate::TransactionByteFee::get(),
|
||||
pallet_transaction_payment::Pallet::<Runtime>::next_fee_multiplier(),
|
||||
|weight| WeightToFee::calc(&weight),
|
||||
|weight| WeightToFee::weight_to_fee(&weight),
|
||||
transaction,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user