XCMP Defer XCM Prototype#3
Open
apopiak wants to merge 35 commits into
Open
Conversation
3 tasks
dmoka
reviewed
Jul 7, 2023
| let deferred_xcm_messages = vec![deferred_message.clone(); max_messages]; | ||
| crate::Pallet::<T>::inject_deferred_messages(para_id, deferred_xcm_messages.try_into().unwrap()); | ||
| assert_eq!(crate::Pallet::<T>::deferred_messages(para_id).len(), max_messages); | ||
| // TODO: figure out how to get the weight of the xcm in a production runtime (Weigher not available) |
| deferred_to: 6, | ||
| }; | ||
|
|
||
| assert_eq!( |
There was a problem hiding this comment.
I would create a helper method macro called assert_deferred_messages, with para id and vec of messages, so we can use it in most tests.
It helps with readability, but also simplifies changes if something is modified within DeferredXcmMessages storage
Co-authored-by: Daniel Moka <mokabme@gmail.com>
Co-authored-by: Daniel Moka <mokabme@gmail.com>
Co-authored-by: Daniel Moka <mokabme@gmail.com>
…l/cumulus into feat/xcmp-defer-xcm-v9-38
Feature: Extend Defer Queue
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a mechanism for deferring XCMs. The new config
XcmDeferFilterallows the implementer to defer the execution of an XCM by a number of relay chain blocks.Todos
sent_at