-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XCMP Defer XCM Prototype #3
base: polkadot-v0.9.38
Are you sure you want to change the base?
Conversation
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo, wondering how we could solve this
pallets/xcmp-queue/src/tests.rs
Outdated
deferred_to: 6, | ||
}; | ||
|
||
assert_eq!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Adds a mechanism for deferring XCMs. The new config
XcmDeferFilter
allows the implementer to defer the execution of an XCM by a number of relay chain blocks.Todos
sent_at