-
Notifications
You must be signed in to change notification settings - Fork 699
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 <milesbrentpatterson@proton.me> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Bastian Köcher <info@kchr.de>
- Loading branch information
1 parent
4cd7e86
commit 504edb1
Showing
3 changed files
with
80 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Fix for issue #4762 | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
When the status of the queue is on_initialize, throw a defensive message and return weight of 0, | ||
however when status is on_idle, do not throw a defensive message, only return weight of 0 | ||
|
||
crates: | ||
- name: pallet-message-queue | ||
bump: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters