mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
@@ -2046,7 +2046,7 @@ mod tests_fess {
|
||||
#[cfg(test)]
|
||||
mod multiplier_tests {
|
||||
use super::*;
|
||||
use frame_support::{dispatch::GetDispatchInfo, traits::OnFinalize};
|
||||
use frame_support::{dispatch::DispatchInfo, traits::OnFinalize};
|
||||
use runtime_common::{MinimumMultiplier, TargetBlockFullness};
|
||||
use separator::Separatable;
|
||||
use sp_runtime::traits::Convert;
|
||||
@@ -2088,17 +2088,8 @@ mod multiplier_tests {
|
||||
let mut blocks = 0;
|
||||
let mut fees_paid = 0;
|
||||
|
||||
let call = frame_system::Call::<Runtime>::fill_block {
|
||||
ratio: Perbill::from_rational(
|
||||
block_weight.ref_time(),
|
||||
BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap().ref_time(),
|
||||
),
|
||||
};
|
||||
println!("calling {:?}", call);
|
||||
let info = call.get_dispatch_info();
|
||||
// convert to outer call.
|
||||
let call = RuntimeCall::System(call);
|
||||
let len = call.using_encoded(|e| e.len()) as u32;
|
||||
frame_system::Pallet::<Runtime>::set_block_consumed_resources(Weight::MAX, 0);
|
||||
let info = DispatchInfo { weight: Weight::MAX, ..Default::default() };
|
||||
|
||||
let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default()
|
||||
.build_storage::<Runtime>()
|
||||
@@ -2112,7 +2103,7 @@ mod multiplier_tests {
|
||||
while multiplier <= Multiplier::from_u32(1) {
|
||||
t.execute_with(|| {
|
||||
// imagine this tx was called.
|
||||
let fee = TransactionPayment::compute_fee(len, &info, 0);
|
||||
let fee = TransactionPayment::compute_fee(0, &info, 0);
|
||||
fees_paid += fee;
|
||||
|
||||
// this will update the multiplier.
|
||||
|
||||
Reference in New Issue
Block a user