Skip to content
Snippets Groups Projects
Commit 56d58d60 authored by Branislav Kontur's avatar Branislav Kontur Committed by Bastian Köcher
Browse files

More accurate dispatch_result: true/false (#1659)

parent 59b36b43
Branches
No related merge requests found
......@@ -511,14 +511,40 @@ pub mod target {
};
let xcm_outcome = do_dispatch();
log::trace!(
target: "runtime::bridge-dispatch",
"Incoming message {:?} dispatched with result: {:?}",
message_id,
xcm_outcome,
);
let dispatch_result = match xcm_outcome {
Ok(outcome) => {
log::trace!(
target: "runtime::bridge-dispatch",
"Incoming message {:?} dispatched with result: {:?}",
message_id,
outcome,
);
match outcome.ensure_execution() {
Ok(_weight) => true,
Err(e) => {
log::error!(
target: "runtime::bridge-dispatch",
"Incoming message {:?} was not dispatched, error: {:?}",
message_id,
e,
);
false
},
}
},
Err(e) => {
log::error!(
target: "runtime::bridge-dispatch",
"Incoming message {:?} was not dispatched, codec error: {:?}",
message_id,
e,
);
false
},
};
MessageDispatchResult {
dispatch_result: true,
dispatch_result,
unspent_weight: Weight::zero(),
dispatch_fee_paid_during_dispatch: false,
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment