Skip to content

Commit 9e7dd31

Browse files
authored
Remove unneeded error debug strings (paritytech#2017)
* Remove unneeded error debug strings This reverts commit ff33e6c.
1 parent 7680abe commit 9e7dd31

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

bridges/bin/runtime-common/src/messages_xcm_extension.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub type XcmAsPlainPayload = sp_std::prelude::Vec<u8>;
4242
pub enum XcmBlobMessageDispatchResult {
4343
InvalidPayload,
4444
Dispatched,
45-
NotDispatched(#[codec(skip)] &'static str),
45+
NotDispatched(#[codec(skip)] Option<DispatchBlobError>),
4646
}
4747

4848
/// [`XcmBlobMessageDispatch`] is responsible for dispatching received messages
@@ -106,24 +106,12 @@ impl<
106106
XcmBlobMessageDispatchResult::Dispatched
107107
},
108108
Err(e) => {
109-
let e = match e {
110-
DispatchBlobError::Unbridgable => "DispatchBlobError::Unbridgable",
111-
DispatchBlobError::InvalidEncoding => "DispatchBlobError::InvalidEncoding",
112-
DispatchBlobError::UnsupportedLocationVersion =>
113-
"DispatchBlobError::UnsupportedLocationVersion",
114-
DispatchBlobError::UnsupportedXcmVersion =>
115-
"DispatchBlobError::UnsupportedXcmVersion",
116-
DispatchBlobError::RoutingError => "DispatchBlobError::RoutingError",
117-
DispatchBlobError::NonUniversalDestination =>
118-
"DispatchBlobError::NonUniversalDestination",
119-
DispatchBlobError::WrongGlobal => "DispatchBlobError::WrongGlobal",
120-
};
121109
log::error!(
122110
target: crate::LOG_TARGET_BRIDGE_DISPATCH,
123111
"[XcmBlobMessageDispatch] DispatchBlob::dispatch_blob failed, error: {:?} - message_nonce: {:?}",
124112
e, message.key.nonce
125113
);
126-
XcmBlobMessageDispatchResult::NotDispatched(e)
114+
XcmBlobMessageDispatchResult::NotDispatched(Some(e))
127115
},
128116
};
129117
MessageDispatchResult { unspent_weight: Weight::zero(), dispatch_level_result }

0 commit comments

Comments
 (0)