mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Deprecate Weight::from_{ref_time, proof_size} (#13475)
* Deprecate Weight::from_{ref_time, proof_size}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update templates
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Dont revert comment 🤦
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
* Update weight files
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Adapt to Master changes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
7981d4aa59
commit
9e56e1acdd
@@ -33,7 +33,7 @@ use substrate_test_utils::assert_eq_uvec;
|
||||
fn basic_scheduling_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
|
||||
assert_ok!(Scheduler::do_schedule(
|
||||
DispatchTime::At(4),
|
||||
@@ -55,7 +55,7 @@ fn basic_scheduling_works() {
|
||||
fn scheduling_with_preimages_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let hash = <Test as frame_system::Config>::Hashing::hash_of(&call);
|
||||
let len = call.using_encoded(|x| x.len()) as u32;
|
||||
// Important to use here `Bounded::Lookup` to ensure that we request the hash.
|
||||
@@ -79,7 +79,7 @@ fn schedule_after_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
run_to_block(2);
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
|
||||
// This will schedule the call 3 blocks after the next block... so block 3 + 3 = 6
|
||||
assert_ok!(Scheduler::do_schedule(
|
||||
@@ -103,7 +103,7 @@ fn schedule_after_zero_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
run_to_block(2);
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
|
||||
assert_ok!(Scheduler::do_schedule(
|
||||
DispatchTime::After(0),
|
||||
@@ -131,7 +131,7 @@ fn periodic_scheduling_works() {
|
||||
root(),
|
||||
Preimage::bound(RuntimeCall::Logger(logger::Call::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10)
|
||||
weight: Weight::from_parts(10, 0)
|
||||
}))
|
||||
.unwrap()
|
||||
));
|
||||
@@ -156,7 +156,7 @@ fn periodic_scheduling_works() {
|
||||
fn reschedule_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
|
||||
assert_eq!(
|
||||
Scheduler::do_schedule(
|
||||
@@ -195,7 +195,7 @@ fn reschedule_works() {
|
||||
fn reschedule_named_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
|
||||
assert_eq!(
|
||||
Scheduler::do_schedule_named(
|
||||
@@ -235,7 +235,7 @@ fn reschedule_named_works() {
|
||||
fn reschedule_named_perodic_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
|
||||
assert_eq!(
|
||||
Scheduler::do_schedule_named(
|
||||
@@ -293,7 +293,7 @@ fn cancel_named_scheduling_works_with_normal_cancel() {
|
||||
root(),
|
||||
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
)
|
||||
@@ -305,7 +305,7 @@ fn cancel_named_scheduling_works_with_normal_cancel() {
|
||||
root(),
|
||||
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
)
|
||||
@@ -331,7 +331,7 @@ fn cancel_named_periodic_scheduling_works() {
|
||||
root(),
|
||||
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
)
|
||||
@@ -345,7 +345,7 @@ fn cancel_named_periodic_scheduling_works() {
|
||||
root(),
|
||||
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10)
|
||||
weight: Weight::from_parts(10, 0)
|
||||
}))
|
||||
.unwrap(),
|
||||
)
|
||||
@@ -359,7 +359,7 @@ fn cancel_named_periodic_scheduling_works() {
|
||||
root(),
|
||||
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
)
|
||||
@@ -581,12 +581,12 @@ fn scheduler_respects_priority_ordering_with_soft_deadlines() {
|
||||
#[test]
|
||||
fn on_initialize_weight_is_correct() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call_weight = Weight::from_ref_time(25);
|
||||
let call_weight = Weight::from_parts(25, 0);
|
||||
|
||||
// Named
|
||||
let call = RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 3,
|
||||
weight: call_weight + Weight::from_ref_time(1),
|
||||
weight: call_weight + Weight::from_parts(1, 0),
|
||||
});
|
||||
assert_ok!(Scheduler::do_schedule_named(
|
||||
[1u8; 32],
|
||||
@@ -598,7 +598,7 @@ fn on_initialize_weight_is_correct() {
|
||||
));
|
||||
let call = RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: call_weight + Weight::from_ref_time(2),
|
||||
weight: call_weight + Weight::from_parts(2, 0),
|
||||
});
|
||||
// Anon Periodic
|
||||
assert_ok!(Scheduler::do_schedule(
|
||||
@@ -610,7 +610,7 @@ fn on_initialize_weight_is_correct() {
|
||||
));
|
||||
let call = RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: call_weight + Weight::from_ref_time(3),
|
||||
weight: call_weight + Weight::from_parts(3, 0),
|
||||
});
|
||||
// Anon
|
||||
assert_ok!(Scheduler::do_schedule(
|
||||
@@ -623,7 +623,7 @@ fn on_initialize_weight_is_correct() {
|
||||
// Named Periodic
|
||||
let call = RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 2600,
|
||||
weight: call_weight + Weight::from_ref_time(4),
|
||||
weight: call_weight + Weight::from_parts(4, 0),
|
||||
});
|
||||
assert_ok!(Scheduler::do_schedule_named(
|
||||
[2u8; 32],
|
||||
@@ -641,7 +641,7 @@ fn on_initialize_weight_is_correct() {
|
||||
TestWeightInfo::service_agenda_base(1) +
|
||||
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, true) +
|
||||
TestWeightInfo::execute_dispatch_unsigned() +
|
||||
call_weight + Weight::from_ref_time(4)
|
||||
call_weight + Weight::from_parts(4, 0)
|
||||
);
|
||||
assert_eq!(IncompleteSince::<Test>::get(), None);
|
||||
assert_eq!(logger::log(), vec![(root(), 2600u32)]);
|
||||
@@ -653,10 +653,10 @@ fn on_initialize_weight_is_correct() {
|
||||
TestWeightInfo::service_agenda_base(2) +
|
||||
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, true) +
|
||||
TestWeightInfo::execute_dispatch_unsigned() +
|
||||
call_weight + Weight::from_ref_time(3) +
|
||||
call_weight + Weight::from_parts(3, 0) +
|
||||
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, false) +
|
||||
TestWeightInfo::execute_dispatch_unsigned() +
|
||||
call_weight + Weight::from_ref_time(2)
|
||||
call_weight + Weight::from_parts(2, 0)
|
||||
);
|
||||
assert_eq!(IncompleteSince::<Test>::get(), None);
|
||||
assert_eq!(logger::log(), vec![(root(), 2600u32), (root(), 69u32), (root(), 42u32)]);
|
||||
@@ -668,7 +668,7 @@ fn on_initialize_weight_is_correct() {
|
||||
TestWeightInfo::service_agenda_base(1) +
|
||||
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, false) +
|
||||
TestWeightInfo::execute_dispatch_unsigned() +
|
||||
call_weight + Weight::from_ref_time(1)
|
||||
call_weight + Weight::from_parts(1, 0)
|
||||
);
|
||||
assert_eq!(IncompleteSince::<Test>::get(), None);
|
||||
assert_eq!(
|
||||
@@ -690,11 +690,11 @@ fn root_calls_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
assert_ok!(
|
||||
Scheduler::schedule_named(RuntimeOrigin::root(), [1u8; 32], 4, None, 127, call,)
|
||||
@@ -719,15 +719,15 @@ fn fails_to_schedule_task_in_the_past() {
|
||||
|
||||
let call1 = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
let call3 = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
|
||||
assert_noop!(
|
||||
@@ -752,11 +752,11 @@ fn should_use_origin() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
assert_ok!(Scheduler::schedule_named(
|
||||
system::RawOrigin::Signed(1).into(),
|
||||
@@ -784,11 +784,11 @@ fn should_check_origin() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
assert_noop!(
|
||||
Scheduler::schedule_named(
|
||||
@@ -813,11 +813,11 @@ fn should_check_origin_for_cancel() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
|
||||
i: 42,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}));
|
||||
assert_ok!(Scheduler::schedule_named(
|
||||
system::RawOrigin::Signed(1).into(),
|
||||
@@ -861,7 +861,7 @@ fn migration_to_v4_works() {
|
||||
priority: i as u8 + 10,
|
||||
call: RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100),
|
||||
weight: Weight::from_parts(100, 0),
|
||||
}),
|
||||
maybe_periodic: None,
|
||||
}),
|
||||
@@ -871,7 +871,7 @@ fn migration_to_v4_works() {
|
||||
priority: 123,
|
||||
call: RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
}),
|
||||
@@ -892,7 +892,7 @@ fn migration_to_v4_works() {
|
||||
priority: 10,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100),
|
||||
weight: Weight::from_parts(100, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: None,
|
||||
@@ -905,7 +905,7 @@ fn migration_to_v4_works() {
|
||||
priority: 123,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
@@ -922,7 +922,7 @@ fn migration_to_v4_works() {
|
||||
priority: 11,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100),
|
||||
weight: Weight::from_parts(100, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: None,
|
||||
@@ -935,7 +935,7 @@ fn migration_to_v4_works() {
|
||||
priority: 123,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
@@ -952,7 +952,7 @@ fn migration_to_v4_works() {
|
||||
priority: 12,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100),
|
||||
weight: Weight::from_parts(100, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: None,
|
||||
@@ -965,7 +965,7 @@ fn migration_to_v4_works() {
|
||||
priority: 123,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
@@ -998,7 +998,7 @@ fn test_migrate_origin() {
|
||||
priority: i as u8 + 10,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100),
|
||||
weight: Weight::from_parts(100, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
origin: 3u32,
|
||||
@@ -1012,7 +1012,7 @@ fn test_migrate_origin() {
|
||||
origin: 2u32,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10),
|
||||
weight: Weight::from_parts(10, 0),
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
@@ -1045,7 +1045,7 @@ fn test_migrate_origin() {
|
||||
priority: 10,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100)
|
||||
weight: Weight::from_parts(100, 0)
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: None,
|
||||
@@ -1058,7 +1058,7 @@ fn test_migrate_origin() {
|
||||
priority: 123,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10)
|
||||
weight: Weight::from_parts(10, 0)
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
@@ -1075,7 +1075,7 @@ fn test_migrate_origin() {
|
||||
priority: 11,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100)
|
||||
weight: Weight::from_parts(100, 0)
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: None,
|
||||
@@ -1088,7 +1088,7 @@ fn test_migrate_origin() {
|
||||
priority: 123,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10)
|
||||
weight: Weight::from_parts(10, 0)
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
@@ -1105,7 +1105,7 @@ fn test_migrate_origin() {
|
||||
priority: 12,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 96,
|
||||
weight: Weight::from_ref_time(100)
|
||||
weight: Weight::from_parts(100, 0)
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: None,
|
||||
@@ -1118,7 +1118,7 @@ fn test_migrate_origin() {
|
||||
priority: 123,
|
||||
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
|
||||
i: 69,
|
||||
weight: Weight::from_ref_time(10)
|
||||
weight: Weight::from_parts(10, 0)
|
||||
}))
|
||||
.unwrap(),
|
||||
maybe_periodic: Some((456u64, 10)),
|
||||
@@ -1136,7 +1136,7 @@ fn test_migrate_origin() {
|
||||
fn postponed_named_task_cannot_be_rescheduled() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(1000) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(1000, 0) });
|
||||
let hash = <Test as frame_system::Config>::Hashing::hash_of(&call);
|
||||
let len = call.using_encoded(|x| x.len()) as u32;
|
||||
// Important to use here `Bounded::Lookup` to ensure that we request the hash.
|
||||
@@ -1204,7 +1204,7 @@ fn scheduler_v3_anon_basic_works() {
|
||||
use frame_support::traits::schedule::v3::Anon;
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
|
||||
// Schedule a call.
|
||||
let _address = <Scheduler as Anon<_, _, _>>::schedule(
|
||||
@@ -1233,7 +1233,7 @@ fn scheduler_v3_anon_cancel_works() {
|
||||
use frame_support::traits::schedule::v3::Anon;
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
|
||||
// Schedule a call.
|
||||
@@ -1260,7 +1260,7 @@ fn scheduler_v3_anon_reschedule_works() {
|
||||
use frame_support::traits::schedule::v3::Anon;
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
|
||||
// Schedule a call.
|
||||
let address = <Scheduler as Anon<_, _, _>>::schedule(
|
||||
@@ -1307,7 +1307,7 @@ fn scheduler_v3_anon_next_schedule_time_works() {
|
||||
use frame_support::traits::schedule::v3::Anon;
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
|
||||
// Schedule a call.
|
||||
@@ -1344,7 +1344,7 @@ fn scheduler_v3_anon_reschedule_and_next_schedule_time_work() {
|
||||
use frame_support::traits::schedule::v3::Anon;
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
|
||||
// Schedule a call.
|
||||
@@ -1386,7 +1386,7 @@ fn scheduler_v3_anon_schedule_agenda_overflows() {
|
||||
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
|
||||
// Schedule the maximal number allowed per block.
|
||||
@@ -1422,7 +1422,7 @@ fn scheduler_v3_anon_cancel_and_schedule_fills_holes() {
|
||||
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
let mut addrs = Vec::<_>::default();
|
||||
|
||||
@@ -1471,7 +1471,7 @@ fn scheduler_v3_anon_reschedule_fills_holes() {
|
||||
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
let mut addrs = Vec::<_>::default();
|
||||
|
||||
@@ -1515,7 +1515,7 @@ fn scheduler_v3_named_basic_works() {
|
||||
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let name = [1u8; 32];
|
||||
|
||||
// Schedule a call.
|
||||
@@ -1547,7 +1547,7 @@ fn scheduler_v3_named_cancel_named_works() {
|
||||
use frame_support::traits::schedule::v3::Named;
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
let name = [1u8; 32];
|
||||
|
||||
@@ -1577,7 +1577,7 @@ fn scheduler_v3_named_cancel_without_name_works() {
|
||||
use frame_support::traits::schedule::v3::{Anon, Named};
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
let name = [1u8; 32];
|
||||
|
||||
@@ -1607,7 +1607,7 @@ fn scheduler_v3_named_reschedule_named_works() {
|
||||
use frame_support::traits::schedule::v3::{Anon, Named};
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let name = [1u8; 32];
|
||||
|
||||
// Schedule a call.
|
||||
@@ -1666,7 +1666,7 @@ fn scheduler_v3_named_next_schedule_time_works() {
|
||||
use frame_support::traits::schedule::v3::{Anon, Named};
|
||||
new_test_ext().execute_with(|| {
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let bound = Preimage::bound(call).unwrap();
|
||||
let name = [1u8; 32];
|
||||
|
||||
@@ -1711,7 +1711,7 @@ fn cancel_last_task_removes_agenda() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let when = 4;
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let address = Scheduler::do_schedule(
|
||||
DispatchTime::At(when),
|
||||
None,
|
||||
@@ -1745,7 +1745,7 @@ fn cancel_named_last_task_removes_agenda() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let when = 4;
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
Scheduler::do_schedule_named(
|
||||
[1u8; 32],
|
||||
DispatchTime::At(when),
|
||||
@@ -1781,7 +1781,7 @@ fn reschedule_last_task_removes_agenda() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let when = 4;
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
let address = Scheduler::do_schedule(
|
||||
DispatchTime::At(when),
|
||||
None,
|
||||
@@ -1818,7 +1818,7 @@ fn reschedule_named_last_task_removes_agenda() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let when = 4;
|
||||
let call =
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
|
||||
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
|
||||
Scheduler::do_schedule_named(
|
||||
[1u8; 32],
|
||||
DispatchTime::At(when),
|
||||
|
||||
Reference in New Issue
Block a user