Extend Schedule Pallet for Root Scheduling/Canceling (#5907)

* Add root dispatch to scheduler

* Move encode operation upwards

* fix benchmark

* extend extrinsics

* add some clarifying comments

* start to add benchmarking

* finish weights

* remove double encode

* bump spec

* Update weights

* more accurate weights

* bump base weight
This commit is contained in:
Shawn Tabrizi
2020-05-07 11:47:23 +02:00
committed by GitHub
parent a9523dbc37
commit d8b7520a90
8 changed files with 435 additions and 78 deletions
+2 -2
View File
@@ -1241,7 +1241,7 @@ pub mod schedule {
///
/// - `id`: The identity of the task. This must be unique and will return an error if not.
fn schedule_named(
id: impl Encode,
id: Vec<u8>,
when: BlockNumber,
maybe_periodic: Option<Period<BlockNumber>>,
priority: Priority,
@@ -1255,7 +1255,7 @@ pub mod schedule {
///
/// NOTE: This guaranteed to work only *before* the point that it is due to be executed.
/// If it ends up being delayed beyond the point of execution, then it cannot be cancelled.
fn cancel_named(id: impl Encode) -> Result<(), ()>;
fn cancel_named(id: Vec<u8>) -> Result<(), ()>;
}
}