Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Remove RefTimeWeight #12157

Merged
merged 22 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
more fix
  • Loading branch information
shawntabrizi committed Aug 31, 2022
commit 70e70de506db71bca21c467fed91c2aa77a64a94
2 changes: 1 addition & 1 deletion bin/node/runtime/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ mod multiplier_tests {
#[test]
fn weight_to_fee_should_not_overflow_on_large_weights() {
let kb = Weight::from_ref_time(1024);
let mb = kb * kb;
let mb = 1024u64 * kb;
let max_fm = Multiplier::saturating_from_integer(i128::MAX);

// check that for all values it can compute, correctly.
Expand Down
2 changes: 1 addition & 1 deletion frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ mod tests {
.base_extrinsic;
assert_eq!(
<frame_system::Pallet<Runtime>>::block_weight().total(),
base_block_weight + 3 * extrinsic_weight,
base_block_weight + 3u64 * extrinsic_weight,
);
assert_eq!(<frame_system::Pallet<Runtime>>::all_extrinsics_len(), 3 * len);

Expand Down
4 changes: 2 additions & 2 deletions frame/utility/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ fn batch_handles_weight_refund() {
let good_call = call_foobar(false, start_weight, Some(end_weight));
let bad_call = call_foobar(true, start_weight, Some(end_weight));
let batch_calls = vec![good_call, bad_call];
let batch_len = Weight::from_ref_time(batch_calls.len() as u64);
let batch_len = batch_calls.len() as u64;
let call = Call::Utility(UtilityCall::batch { calls: batch_calls });
let info = call.get_dispatch_info();
let result = call.dispatch(Origin::signed(1));
Expand Down Expand Up @@ -533,7 +533,7 @@ fn batch_all_handles_weight_refund() {
let good_call = call_foobar(false, start_weight, Some(end_weight));
let bad_call = call_foobar(true, start_weight, Some(end_weight));
let batch_calls = vec![good_call, bad_call];
let batch_len = Weight::from_ref_time(batch_calls.len() as u64);
let batch_len = batch_calls.len() as u64;
let call = Call::Utility(UtilityCall::batch_all { calls: batch_calls });
let info = call.get_dispatch_info();
let result = call.dispatch(Origin::signed(1));
Expand Down