Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed Jan 19, 2023
commit b9159adb477468aa8ffdce61c69616c575f19e24
6 changes: 3 additions & 3 deletions frame/system/src/extensions/check_weight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,11 +672,11 @@ mod tests {
.base_block(Weight::zero())
.for_class(DispatchClass::non_mandatory(), |w| {
w.base_extrinsic = Weight::zero();
w.max_total = Weight::from_ref_time(20).set_proof_size(20000).into();
w.max_total = Weight::from_parts(20, u64::MAX).into();
})
.for_class(DispatchClass::Mandatory, |w| {
w.base_extrinsic = Weight::zero();
w.reserved = Weight::from_ref_time(5).set_proof_size(20000).into();
w.reserved = Weight::from_parts(5, u64::MAX).into();
w.max_total = WeightLimit::UNLIMITED;
})
.build_or_panic();
Expand All @@ -685,7 +685,7 @@ mod tests {
DispatchClass::Operational => Weight::from_ref_time(10),
DispatchClass::Mandatory => Weight::zero(),
});
assert_eq!(maximum_weight.max_block, all_weight.total().set_proof_size(20000));
assert_eq!(maximum_weight.max_block, all_weight.total().set_proof_size(u64::MAX));

// fits into reserved
let mandatory1 = DispatchInfo {
Expand Down
3 changes: 0 additions & 3 deletions frame/system/src/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@ impl BlockWeights {
.max_extrinsic
.limited_or(Weight::zero())
.all_lte(max_for_class.saturating_sub(base_for_class).limited_or_max()),
/*weights // FAIL-CI why does this not work?
.max_extrinsic
.all_less_or_equal(&max_for_class.saturating_sub(base_for_class)),*/
&mut error,
"[{:?}] {:?} (max_extrinsic) can't be greater than {:?} (max for class)",
class,
Expand Down