mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +00:00
Emit dispatch message when whole message (payload) has invalid encoding (#664)
* emit dispatch message when whole message (payload) has invalid encoding * DispatchMessage::dispatch accepts Result
This commit is contained in:
committed by
Bastian Köcher
parent
dee8d6df94
commit
9414c0d6fe
@@ -41,6 +41,9 @@ pub trait MessageDispatch<MessageId> {
|
||||
///
|
||||
/// `id` is a short unique identifier of the message.
|
||||
///
|
||||
/// Returns post-dispatch (actual) message weight.
|
||||
fn dispatch(bridge: InstanceId, id: MessageId, message: Self::Message);
|
||||
/// If message is `Ok`, then it should be dispatched. If it is `Err`, then it's just
|
||||
/// a sign that some other component has rejected the message even before it has
|
||||
/// reached `dispatch` method (right now this may only be caused if we fail to decode
|
||||
/// the whole message).
|
||||
fn dispatch(bridge: InstanceId, id: MessageId, message: Result<Self::Message, ()>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user