mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 11:01:01 +00:00
Merge commit '392447f5c8f986ded2559a78457f4cd87942f393' into update-bridges-subtree-r/w
This commit is contained in:
@@ -76,7 +76,7 @@ pub trait SourceHeaderChain<Fee> {
|
||||
/// messages will be rejected.
|
||||
///
|
||||
/// The `messages_count` argument verification (sane limits) is supposed to be made
|
||||
/// outside of this function. This function only verifies that the proof declares exactly
|
||||
/// outside this function. This function only verifies that the proof declares exactly
|
||||
/// `messages_count` messages.
|
||||
fn verify_messages_proof(
|
||||
proof: Self::MessagesProof,
|
||||
@@ -112,23 +112,19 @@ pub trait MessageDispatch<AccountId, Fee> {
|
||||
|
||||
impl<Message> Default for ProvedLaneMessages<Message> {
|
||||
fn default() -> Self {
|
||||
ProvedLaneMessages {
|
||||
lane_state: None,
|
||||
messages: Vec::new(),
|
||||
}
|
||||
ProvedLaneMessages { lane_state: None, messages: Vec::new() }
|
||||
}
|
||||
}
|
||||
|
||||
impl<DispatchPayload: Decode, Fee> From<Message<Fee>> for DispatchMessage<DispatchPayload, Fee> {
|
||||
fn from(message: Message<Fee>) -> Self {
|
||||
DispatchMessage {
|
||||
key: message.key,
|
||||
data: message.data.into(),
|
||||
}
|
||||
DispatchMessage { key: message.key, data: message.data.into() }
|
||||
}
|
||||
}
|
||||
|
||||
impl<DispatchPayload: Decode, Fee> From<MessageData<Fee>> for DispatchMessageData<DispatchPayload, Fee> {
|
||||
impl<DispatchPayload: Decode, Fee> From<MessageData<Fee>>
|
||||
for DispatchMessageData<DispatchPayload, Fee>
|
||||
{
|
||||
fn from(data: MessageData<Fee>) -> Self {
|
||||
DispatchMessageData {
|
||||
payload: DispatchPayload::decode(&mut &data.payload[..]),
|
||||
@@ -142,7 +138,8 @@ impl<DispatchPayload: Decode, Fee> From<MessageData<Fee>> for DispatchMessageDat
|
||||
pub struct ForbidInboundMessages;
|
||||
|
||||
/// Error message that is used in `ForbidOutboundMessages` implementation.
|
||||
const ALL_INBOUND_MESSAGES_REJECTED: &str = "This chain is configured to reject all inbound messages";
|
||||
const ALL_INBOUND_MESSAGES_REJECTED: &str =
|
||||
"This chain is configured to reject all inbound messages";
|
||||
|
||||
impl<Fee> SourceHeaderChain<Fee> for ForbidInboundMessages {
|
||||
type Error = &'static str;
|
||||
@@ -163,7 +160,10 @@ impl<AccountId, Fee> MessageDispatch<AccountId, Fee> for ForbidInboundMessages {
|
||||
Weight::MAX
|
||||
}
|
||||
|
||||
fn dispatch(_: &AccountId, _: DispatchMessage<Self::DispatchPayload, Fee>) -> MessageDispatchResult {
|
||||
fn dispatch(
|
||||
_: &AccountId,
|
||||
_: DispatchMessage<Self::DispatchPayload, Fee>,
|
||||
) -> MessageDispatchResult {
|
||||
MessageDispatchResult {
|
||||
dispatch_result: false,
|
||||
unspent_weight: 0,
|
||||
|
||||
Reference in New Issue
Block a user