Skip to content
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

Add on_idle hook and offchain_worker example #6416

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

annatekl-dev
Copy link

@annatekl-dev annatekl-dev commented Nov 8, 2024

Implement on_idle hook to log block numbers during idle periods, and improve code formatting in lib.rs. This change adds logging functionality during idle times and ensures code consistency.

Implement on_idle hook and fix formatting
@annatekl-dev annatekl-dev requested a review from a team as a code owner November 8, 2024 14:28
@cla-bot-2021
Copy link

cla-bot-2021 bot commented Nov 8, 2024

User @annatekl-dev, please sign the CLA here.

@annatekl-dev
Copy link
Author

open @ggwpez

// A runtime code run after every block and has access to an extended set of APIs.
//
// For instance, you can generate extrinsics for the upcoming produced block.
fn offchain_worker(_n: BlockNumberFor<T>) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need to be inside the pallet? Did you test that it works as expected?

@paritytech-review-bot paritytech-review-bot bot requested a review from a team January 3, 2025 13:15
@ggwpez
Copy link
Member

ggwpez commented Jan 3, 2025

Sorry for not seeing this earlier, i was OOO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants