Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6d11c9d
allow specify schedule dispatch origin
xlc Jun 18, 2020
8aa6ed9
fix tests
xlc Jun 19, 2020
a572232
use caller origin for scheduled
xlc Jun 19, 2020
8eba0a4
fix tests
xlc Jun 19, 2020
d51269a
line width
xlc Jun 19, 2020
5f1ee49
check origin for cancel
xlc Jun 19, 2020
fb5b48d
line width
xlc Jun 19, 2020
b7c9cba
fix some issues for benchmarking
xlc Jun 19, 2020
b2e1067
fix doc test
xlc Jun 19, 2020
f61230b
another way to constraint origin
xlc Jun 20, 2020
061d78f
Merge remote-tracking branch 'origin/master' into update-scheduler
xlc Jun 20, 2020
f43f468
fix build issues
xlc Jun 21, 2020
14b7522
fix cancel
xlc Jun 21, 2020
2c4a7d2
line width
xlc Jun 21, 2020
bc166a7
fix benchmarks
xlc Jun 21, 2020
9fc1fc0
bump version
xlc Jun 21, 2020
97cbaf3
enable runtime upgrade
xlc Jun 22, 2020
9dc582a
add migration code and test
xlc Jun 23, 2020
dd97a5a
Merge remote-tracking branch 'origin/master' into update-scheduler
xlc Jun 23, 2020
ae0231a
Update frame/scheduler/src/lib.rs
xlc Jun 23, 2020
c3f9e55
expose migration method
xlc Jun 23, 2020
5f00a81
Merge remote-tracking branch 'origin/master' into update-scheduler
xlc Jun 23, 2020
39040bc
add notes
xlc Jun 23, 2020
79cde79
Merge remote-tracking branch 'origin/master' into update-scheduler
xlc Jun 24, 2020
4099003
Merge remote-tracking branch 'origin/master' into update-scheduler
xlc Jun 25, 2020
b9000e8
Merge remote-tracking branch 'origin/master' into update-scheduler
xlc Jun 27, 2020
5b65287
bump version
xlc Jun 27, 2020
f19c49f
remove on_runtime_upgrade
xlc Jun 27, 2020
40e99bc
fix test
xlc Jun 27, 2020
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
line width
  • Loading branch information
xlc committed Jun 19, 2020
commit fb5b48de99aeb4a458c0ba33416b447b2079fff4
16 changes: 12 additions & 4 deletions frame/scheduler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,10 @@ where
(when, index)
}

fn do_cancel(origin: Option<T::PalletsOrigin>, (when, index): TaskAddress<T::BlockNumber>) -> Result<(), DispatchError> {
fn do_cancel(
origin: Option<T::PalletsOrigin>,
(when, index): TaskAddress<T::BlockNumber>
) -> Result<(), DispatchError> {
let scheduled = Agenda::<T>::mutate(
when,
|agenda| {
Expand Down Expand Up @@ -785,8 +788,11 @@ mod tests {
let periodic_multiplier = <Test as frame_system::Trait>::DbWeight::get().reads_writes(1, 1);

// Named
assert_ok!(Scheduler::do_schedule_named(
1u32.encode(), 1, None, 255, root(), Call::Logger(logger::Call::log(3, MaximumSchedulerWeight::get() / 3)))
assert_ok!(
Scheduler::do_schedule_named(
1u32.encode(), 1, None, 255, root(),
Call::Logger(logger::Call::log(3, MaximumSchedulerWeight::get() / 3))
)
);
// Anon Periodic
Scheduler::do_schedule(
Expand All @@ -805,7 +811,9 @@ mod tests {
// Will include the named periodic only
let actual_weight = Scheduler::on_initialize(1);
let call_weight = MaximumSchedulerWeight::get() / 2;
assert_eq!(actual_weight, call_weight + base_weight + base_multiplier + named_multiplier + periodic_multiplier);
assert_eq!(
actual_weight, call_weight + base_weight + base_multiplier + named_multiplier + periodic_multiplier
);
assert_eq!(logger::log(), vec![(root(), 2600u32)]);

// Will include anon and anon periodic
Expand Down