mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 06:37:56 +00:00
[FRAME] Use 'ready' pages in XCMP suspend logic (#2393)
Changes: - `QueueFootprint` gets a new field; `ready_pages` that contains the non-overweight and not yet processed pages. - `XCMP` queue pallet is change to use the `ready_pages` instead of `pages` to calculate the channel suspension thresholds. This should give the XCMP queue pallet a more correct view of when to suspend channels. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
c367ac2488
commit
329c077236
@@ -330,6 +330,11 @@ fn process_some_messages(num_msgs: u32) {
|
||||
ServiceWeight::set(Some(weight));
|
||||
let consumed = next_block();
|
||||
|
||||
for origin in BookStateFor::<Test>::iter_keys() {
|
||||
let fp = MessageQueue::footprint(origin);
|
||||
assert_eq!(fp.pages, fp.ready_pages);
|
||||
}
|
||||
|
||||
assert_eq!(consumed, weight, "\n{}", MessageQueue::debug_info());
|
||||
assert_eq!(NumMessagesProcessed::take(), num_msgs as usize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user