kusama: General Admin to send Location mapping#383
Conversation
|
/merge |
|
Enabled Available commands
For more information see the documentation |
Head branch was pushed to by a user without write access
|
@bkchr @acatangiu FYI, I have added the tests and updated the changelog |
| use kusama_runtime::governance::pallet_custom_origins::Origin::GeneralAdmin as GeneralAdminOrigin; | ||
|
|
||
| #[test] | ||
| fn general_admin_add_registrar() { |
There was a problem hiding this comment.
nit:
Deduplicate general_admin_add_registrar and relay_root_add_registrar tests code since they do the same thing with same result, just using different origins.
Keep both tests, that just call helper fn with different origins.
There was a problem hiding this comment.
I left one test function relay_commands_add_registrar with a loop over two origins.
I personally do not like function abstraction when there is no clear (semantic) abstraction. This is often the case for tests. Frequently, we just move duplicated code into a function with a long name, which makes tests harder to read and maintain. I prefer copy-pasting over poor abstraction. Additionally, such abstractions introduce a variety of different styles to the codebase. I also prefer consistency in code style. A test framework is usually helpful in maintaining this consistency. For example, in my case, a data provider for a test function could be used.
| /// interior location of this chain for a destination chain. | ||
| pub type LocalPalletOrSignedOriginToLocation = ( | ||
| // GeneralAdmin origin to be used in XCM as a corresponding Plurality `Location` value. | ||
| GeneralAdminToPlurality, |
There was a problem hiding this comment.
orthogonal to this PR, but quick Q: Kusama is also missing TreasurerToPlurality?
There was a problem hiding this comment.
I do not see a use case for it now. In Polkadot we need it to manage Fellowship Treasury on Collectives.
|
/merge |
|
Enabled Available commands
For more information see the documentation |
Fixes: #382
General Admin Origin to xcm
Locationmapping for outgoing messages