-
Notifications
You must be signed in to change notification settings - Fork 747
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
[MQ pallet] Dont warn for low on_idle
weight
#4762
Comments
on_idle
weighton_idle
weight
Yo @ggwpez looking for a good-first-issue to jump into polkadot and contribute. Coming from Ethereum full-stack app development. |
So I see the defensive! getting thrown on line 1562. |
Thanks, yes please go ahead.
Yea that sounds good! I think we dont have a precedent case on how to handle this, but a small enum with two entries |
[Issue #4762 ](#4762) - Creates an enum for passing context of `service_queues` being called from within `on_initialize` and `on_idle` hooks. Uses a match statement inside of `service_queues` to continue using the same code, but NOT throw a `defensive` if being called within `on_idle` hook. - The issue requested to not throw the `defensive` if being called from within `on_idle` hook. - Created the `ServiceQueuesContext` enum to pass as an argument of `service_queues` when called within the `on_initialize` and `on_idle` hooks. A match statement was added inside of `service_queues` to continue to throw the defensive if called from `on_initialize` but NOT throw the defensive if called from `on_idle`. --------- Co-authored-by: gotnoshoeson <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
[Issue #4762 ](#4762) - Creates an enum for passing context of `service_queues` being called from within `on_initialize` and `on_idle` hooks. Uses a match statement inside of `service_queues` to continue using the same code, but NOT throw a `defensive` if being called within `on_idle` hook. - The issue requested to not throw the `defensive` if being called from within `on_idle` hook. - Created the `ServiceQueuesContext` enum to pass as an argument of `service_queues` when called within the `on_initialize` and `on_idle` hooks. A match statement was added inside of `service_queues` to continue to throw the defensive if called from `on_initialize` but NOT throw the defensive if called from `on_idle`. --------- Co-authored-by: gotnoshoeson <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> (cherry picked from commit 504edb1)
[Issue #4762 ](#4762) - Creates an enum for passing context of `service_queues` being called from within `on_initialize` and `on_idle` hooks. Uses a match statement inside of `service_queues` to continue using the same code, but NOT throw a `defensive` if being called within `on_idle` hook. - The issue requested to not throw the `defensive` if being called from within `on_idle` hook. - Created the `ServiceQueuesContext` enum to pass as an argument of `service_queues` when called within the `on_initialize` and `on_idle` hooks. A match statement was added inside of `service_queues` to continue to throw the defensive if called from `on_initialize` but NOT throw the defensive if called from `on_idle`. --------- Co-authored-by: gotnoshoeson <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> (cherry picked from commit 504edb1)
Done in #4803 |
The
on_idle
of the MQ pallet calls theservice_queues
function which prints a warning when it does not have enough weight to do anything.Normally this is an issue since its called from
on_initialize
, buton_idle
it should not print a defensive error.It was introduced in #3844.
The text was updated successfully, but these errors were encountered: