--- a/pallets/scheduler/src/lib.rs +++ b/pallets/scheduler/src/lib.rs @@ -46,15 +46,6 @@ //! If a call is scheduled using proxy or whatever mecanism which adds filter, //! then those filter will not be used when dispatching the schedule call. //! -//! The scheduler is designed for deferred transaction calls by block number. -//! Any user can book a call of a certain transaction to a specific block number. -//! Also possible to book a call with a certain frequency. -//! Key differences from original pallet: -//! Id restricted by 16 bytes -//! Priority limited by HARD DEADLINE (<= 63). Calls over maximum weight don't include to block -//! Maybe_periodic limit is 100 calls -//! Any account allowed to schedule any calls. Account withdraw implemented through default transaction logic. -//! //! ## Interface //! //! ### Dispatchable Functions @@ -152,7 +143,6 @@ pub use preimage_provider::PreimageProviderAndMaybeRecipient; -/// Weight templates for calculating actual fees pub(crate) trait MarginalWeightInfo: WeightInfo { fn item(periodic: bool, named: bool, resolved: Option) -> Weight { match (periodic, named, resolved) { @@ -259,7 +249,7 @@ /// If `Some` then the number of blocks to postpone execution for when the item is delayed. type NoPreimagePostponement: Get>; - /// Sponsoring function. In this version sposorship is disabled + /// Sponsoring function. // type SponsorshipHandler: SponsorshipHandler::Call>; /// The helper type used for custom transaction fee logic. @@ -268,7 +258,6 @@ /// A Scheduler-Runtime interface for finer payment handling. pub trait DispatchCall { - /// Lock balance required for transaction payment fn reserve_balance( id: ScheduledId, sponsor: ::AccountId, @@ -276,7 +265,6 @@ count: u32, ) -> Result<(), DispatchError>; - /// Unlock centain amount from payer fn pay_for_call( id: ScheduledId, sponsor: ::AccountId, @@ -292,7 +280,6 @@ TransactionValidityError, >; - /// Cancel schedule reservation and unlock balance fn cancel_reserve( id: ScheduledId, sponsor: ::AccountId, @@ -436,7 +423,6 @@ continue; } - // Sender is the account who signed transaction let sender = ensure_signed( <::Origin as From>::from(s.origin.clone()) .into(), @@ -452,7 +438,6 @@ // ); // } - // Execute transaction via chain default pipeline let r = T::CallExecutor::dispatch_call(sender, call.clone()); let mut actual_call_weight: Weight = item_weight; @@ -497,8 +482,8 @@ Agenda::::append(wake, Some(s)); } } - /// Weight should be 0, because transaction already paid 0 + //total_weight } }