mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Feature gate do_task in frame_system (#2707)
https://github.com/paritytech/polkadot-sdk/pull/1343/ introduced Tasks API. This one moves `do_task` call in frame_system under the experimental flag, till the previous one is audited. --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -323,9 +323,11 @@ pub mod pallet {
|
||||
#[inject_runtime_type]
|
||||
type RuntimeCall = ();
|
||||
|
||||
/// Converts a module to the index of the module, injected by `construct_runtime!`.
|
||||
/// The aggregated Task type, injected by `construct_runtime!`.
|
||||
#[inject_runtime_type]
|
||||
type RuntimeTask = ();
|
||||
|
||||
/// Converts a module to the index of the module, injected by `construct_runtime!`.
|
||||
#[inject_runtime_type]
|
||||
type PalletInfo = ();
|
||||
|
||||
@@ -637,6 +639,7 @@ pub mod pallet {
|
||||
Ok(().into())
|
||||
}
|
||||
|
||||
#[cfg(feature = "experimental")]
|
||||
#[pallet::call_index(8)]
|
||||
#[pallet::weight(task.weight())]
|
||||
pub fn do_task(origin: OriginFor<T>, task: T::RuntimeTask) -> DispatchResultWithPostInfo {
|
||||
@@ -675,10 +678,13 @@ pub mod pallet {
|
||||
KilledAccount { account: T::AccountId },
|
||||
/// On on-chain remark happened.
|
||||
Remarked { sender: T::AccountId, hash: T::Hash },
|
||||
#[cfg(feature = "experimental")]
|
||||
/// A [`Task`] has started executing
|
||||
TaskStarted { task: T::RuntimeTask },
|
||||
#[cfg(feature = "experimental")]
|
||||
/// A [`Task`] has finished executing.
|
||||
TaskCompleted { task: T::RuntimeTask },
|
||||
#[cfg(feature = "experimental")]
|
||||
/// A [`Task`] failed during execution.
|
||||
TaskFailed { task: T::RuntimeTask, err: DispatchError },
|
||||
}
|
||||
@@ -702,8 +708,10 @@ pub mod pallet {
|
||||
NonZeroRefCount,
|
||||
/// The origin filter prevent the call to be dispatched.
|
||||
CallFiltered,
|
||||
#[cfg(feature = "experimental")]
|
||||
/// The specified [`Task`] is not valid.
|
||||
InvalidTask,
|
||||
#[cfg(feature = "experimental")]
|
||||
/// The specified [`Task`] failed during execution.
|
||||
FailedTask,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user