I have integrated scheduller pallet into my node, trying to test it running the node and using polkadot js. All compiles. The scheduled task event is printed to the explorer, but when the block used as execution time arrives nothing happens. What is the better way to check what part is failing?
The following is the code that schedule the task in the pallet code and the config in runtime lib:
if T::Scheduler::schedule_named(
(POLLS_ID, poll.currency, poll_id).encode(),
DispatchTime::At(end),
None,
63,
frame_system::RawOrigin::Root.into(),
Call::enact_poll_end { poll_currency: poll.currency, poll_id }.into(),
)
.is_err()
impl pallet_scheduler::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type PalletsOrigin = OriginCaller;
type RuntimeCall = RuntimeCall;
type MaximumWeight = (); // No weight limit. Modify this to set a limit.
type ScheduleOrigin = EnsureRoot<AccountId>;
type MaxScheduledPerBlock = ConstU32<100>;
type WeightInfo = ();
type OriginPrivilegeCmp = EqualPrivilegeOnly;
type Preimages = ();
}
MaximumWeight
toWeight::max_value()
by adding a newparameter_type!
for it likeMaxSchedulerWeight
.