Revert dispatch-results (#2048)

* Revert "Reintroduce msg dispatch status reporting (#2027)"

This reverts commit 38bb051e3d778ee2f5e9451f89cf479a71fd68f8.

* post-revert fix
This commit is contained in:
Svyatoslav Nikolsky
2023-04-17 12:14:34 +03:00
committed by Bastian Köcher
parent c2e68484de
commit 512d43fabe
17 changed files with 132 additions and 315 deletions
@@ -90,7 +90,7 @@ pub trait MessageDispatch<AccountId> {
type DispatchPayload: Decode;
/// Fine-grained result of single message dispatch (for better diagnostic purposes)
type DispatchError: Clone + sp_std::fmt::Debug + Eq;
type DispatchLevelResult: Clone + sp_std::fmt::Debug + Eq;
/// Estimate dispatch weight.
///
@@ -109,7 +109,7 @@ pub trait MessageDispatch<AccountId> {
fn dispatch(
relayer_account: &AccountId,
message: DispatchMessage<Self::DispatchPayload>,
) -> MessageDispatchResult<Self::DispatchError>;
) -> MessageDispatchResult<Self::DispatchLevelResult>;
}
/// Manages payments that are happening at the target chain during message delivery transaction.
@@ -190,7 +190,7 @@ impl<MessagesProof, DispatchPayload: Decode, AccountId> MessageDispatch<AccountI
for ForbidInboundMessages<MessagesProof, DispatchPayload>
{
type DispatchPayload = DispatchPayload;
type DispatchError = ();
type DispatchLevelResult = ();
fn dispatch_weight(_message: &mut DispatchMessage<Self::DispatchPayload>) -> Weight {
Weight::MAX
@@ -199,7 +199,7 @@ impl<MessagesProof, DispatchPayload: Decode, AccountId> MessageDispatch<AccountI
fn dispatch(
_: &AccountId,
_: DispatchMessage<Self::DispatchPayload>,
) -> MessageDispatchResult<Self::DispatchError> {
MessageDispatchResult { unspent_weight: Weight::zero(), dispatch_result: Err(()) }
) -> MessageDispatchResult<Self::DispatchLevelResult> {
MessageDispatchResult { unspent_weight: Weight::zero(), dispatch_level_result: () }
}
}