-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pallet-examples: Add missing hooks #6398
Comments
// The on_idle hook is called when the system is idle, typically during periods when no extrinsics are being processed.
fn on_idle(n: T::BlockNumber) -> Weight {
// Log the block number at which the on_idle hook is being called
log::info!("on_idle called at block number {:?}", n);
// Return weight for the operation; this indicates the computational cost
// In this case, we return Weight::zero() because we are not performing any heavy operations
Weight::zero()
} |
Yes looks good. Please open a merge-request (if you are comfortable with this 😄). |
Hey @annatekl-dev please signify if you still working on this. Thanks |
@ggwpez is it ok to take over this one since there hasnt been any replies since ? |
I'm currently working on it but quickest keyboard wins 😋 |
Nah that would be a waste of resources, if you are already on it i will leave it to you but i dont see any commit or branch on your side showing that you are curently working on it ^^' |
(Issue reserved for training purposes)
The
pallet-example-basic
should have all the pallet hooks as demonstration. As a start, theon_idle
could be added.The text was updated successfully, but these errors were encountered: