Co #14318: pallet-message-queue: add queue pausing (#7433)

* Increase recusive limit to 512 for macro expansions

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Increase limit to 1024

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Adjust comment

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Increase more limits

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Add QueuePausedQuery

* ... on westend

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update lockfile for {"substrate"}

* update lockfile for {"substrate"}

* Add QueuePausedQuery

* ... on westend

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix test error

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* CI buggy

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Oliver Tale-Yazdi
2023-06-28 14:17:15 +02:00
committed by GitHub
parent f653f4519b
commit e377e4becd
9 changed files with 205 additions and 190 deletions
+1
View File
@@ -329,6 +329,7 @@ impl pallet_message_queue::Config for Test {
type WeightInfo = TestMessageQueueWeight;
type MessageProcessor = TestProcessMessage;
type QueueChangeHandler = ParaInclusion;
type QueuePausedQuery = ();
type HeapSize = ConstU32<65536>;
type MaxStale = ConstU32<8>;
type ServiceWeight = MessageQueueServiceWeight;
+10 -2
View File
@@ -573,13 +573,21 @@ fn overweight_queue_works() {
.into(),
);
// ... and if we try to service a message with index that doesn't exist it will error
// out.
// But servicing again will not work.
assert_noop!(
<MessageQueue as ServiceQueues>::execute_overweight(
Weight::from_parts(501, 501),
(Ump(UmpQueueId::Para(para_a)), 0, 2)
),
ExecuteOverweightError::AlreadyProcessed,
);
// Using an invalid index does not work.
assert_noop!(
<MessageQueue as ServiceQueues>::execute_overweight(
Weight::from_parts(501, 501),
(Ump(UmpQueueId::Para(para_a)), 0, 3)
),
ExecuteOverweightError::NotFound,
);
});