Tidy up XCM errors in preparation for v2. (#3988)

* Tidy up XCM errors

* Tidy up errors

* Re-order

* Fixes

* Formatting

* map undefined errors

* add functor to dictionary

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Gavin Wood
2021-10-02 00:14:13 +02:00
committed by GitHub
parent 09cecc82de
commit 3bab876bc1
7 changed files with 86 additions and 85 deletions
+5 -5
View File
@@ -74,7 +74,7 @@ fn report_outcome_notify_works() {
Parachain(PARA_ID).into(),
Xcm(vec![QueryResponse {
query_id: 0,
response: Response::ExecutionResult(Ok(())),
response: Response::ExecutionResult(None),
max_weight: 1_000_000,
}]),
1_000_000_000,
@@ -86,7 +86,7 @@ fn report_outcome_notify_works() {
Event::TestNotifier(pallet_test_notifier::Event::ResponseReceived(
Parachain(PARA_ID).into(),
0,
Response::ExecutionResult(Ok(())),
Response::ExecutionResult(None),
)),
Event::XcmPallet(crate::Event::Notified(0, 4, 2)),
]
@@ -128,7 +128,7 @@ fn report_outcome_works() {
Parachain(PARA_ID).into(),
Xcm(vec![QueryResponse {
query_id: 0,
response: Response::ExecutionResult(Ok(())),
response: Response::ExecutionResult(None),
max_weight: 0,
}]),
1_000_000_000,
@@ -136,10 +136,10 @@ fn report_outcome_works() {
assert_eq!(r, Outcome::Complete(1_000));
assert_eq!(
last_event(),
Event::XcmPallet(crate::Event::ResponseReady(0, Response::ExecutionResult(Ok(())),))
Event::XcmPallet(crate::Event::ResponseReady(0, Response::ExecutionResult(None),))
);
let response = Some((Response::ExecutionResult(Ok(())), 1));
let response = Some((Response::ExecutionResult(None), 1));
assert_eq!(XcmPallet::take_response(0), response);
});
}