From 1a4ab9e42a67202c20b1ca65241fcc2e9a059a48 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Tue, 4 Apr 2023 15:05:44 +0300 Subject: [PATCH] Remove unneeded error debug strings (#2017) * Remove unneeded error debug strings This reverts commit ff33e6ce127ea22c359b1b0273d6f3a5a27f484c. --- .../runtime-common/src/messages_xcm_extension.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/bridges/bin/runtime-common/src/messages_xcm_extension.rs b/bridges/bin/runtime-common/src/messages_xcm_extension.rs index 3d802d12fad64..4ccdd7a4b4df5 100644 --- a/bridges/bin/runtime-common/src/messages_xcm_extension.rs +++ b/bridges/bin/runtime-common/src/messages_xcm_extension.rs @@ -42,7 +42,7 @@ pub type XcmAsPlainPayload = sp_std::prelude::Vec; pub enum XcmBlobMessageDispatchResult { InvalidPayload, Dispatched, - NotDispatched(#[codec(skip)] &'static str), + NotDispatched(#[codec(skip)] Option), } /// [`XcmBlobMessageDispatch`] is responsible for dispatching received messages @@ -106,24 +106,12 @@ impl< XcmBlobMessageDispatchResult::Dispatched }, Err(e) => { - let e = match e { - DispatchBlobError::Unbridgable => "DispatchBlobError::Unbridgable", - DispatchBlobError::InvalidEncoding => "DispatchBlobError::InvalidEncoding", - DispatchBlobError::UnsupportedLocationVersion => - "DispatchBlobError::UnsupportedLocationVersion", - DispatchBlobError::UnsupportedXcmVersion => - "DispatchBlobError::UnsupportedXcmVersion", - DispatchBlobError::RoutingError => "DispatchBlobError::RoutingError", - DispatchBlobError::NonUniversalDestination => - "DispatchBlobError::NonUniversalDestination", - DispatchBlobError::WrongGlobal => "DispatchBlobError::WrongGlobal", - }; log::error!( target: crate::LOG_TARGET_BRIDGE_DISPATCH, "[XcmBlobMessageDispatch] DispatchBlob::dispatch_blob failed, error: {:?} - message_nonce: {:?}", e, message.key.nonce ); - XcmBlobMessageDispatchResult::NotDispatched(e) + XcmBlobMessageDispatchResult::NotDispatched(Some(e)) }, }; MessageDispatchResult { unspent_weight: Weight::zero(), dispatch_level_result }