remove fill_block (#6200)

Co-authored-by: parity-processbot <>
This commit is contained in:
Sergej Sakac
2022-11-12 15:14:35 +01:00
committed by GitHub
parent 283f40f3ed
commit 92ea52b112
2 changed files with 8 additions and 26 deletions
+4 -13
View File
@@ -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.
+4 -13
View File
@@ -2299,7 +2299,7 @@ mod test {
#[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;
@@ -2341,17 +2341,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>()
@@ -2365,7 +2356,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.