Skip to content
Commit 2546d0d3 authored by Miles Patterson's avatar Miles Patterson Committed by github-actions[bot]
Browse files

Fix for Issue 4762 (#4803)



[Issue #4762 ](https://github.com/paritytech/polkadot-sdk/issues/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: default avatargotnoshoeson <[email protected]>
Co-authored-by: default avatarBastian Köcher <[email protected]>
Co-authored-by: default avatarBastian Köcher <[email protected]>
(cherry picked from commit 504edb1b)
parent 0e025923
Pipeline #501724 waiting for manual action with stages
in 1 hour, 15 minutes, and 17 seconds