Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Nov 24, 2023
1 parent 3865d0a commit 999d20d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
7 changes: 5 additions & 2 deletions parachain/pallets/outbound-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ sp-io = { path = "../../../polkadot-sdk/substrate/primitives/io", default-featur
sp-arithmetic = { path = "../../../polkadot-sdk/substrate/primitives/arithmetic", default-features = false }

cumulus-primitives-core = { path = "../../../polkadot-sdk/cumulus/primitives/core", default-features = false }
bridge-hub-common = { path = "../../../polkadot-sdk/cumulus/parachains/runtimes/bridge-hubs/common", default-features = false }

snowbridge-core = { path = "../../primitives/core", features = ["serde"], default-features = false }
snowbridge-outbound-queue-merkle-tree = { path = "merkle-tree", default-features = false }
Expand Down Expand Up @@ -55,13 +56,15 @@ std = [
"snowbridge-outbound-queue-merkle-tree/std",
"ethabi/std",
"xcm/std",
"cumulus-primitives-core/std"
"cumulus-primitives-core/std",
"bridge-hub-common/std",
]
runtime-benchmarks = [
"snowbridge-core/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
"cumulus-primitives-core/runtime-benchmarks"
"cumulus-primitives-core/runtime-benchmarks",
"bridge-hub-common/runtime-benchmarks",
]
4 changes: 2 additions & 2 deletions parachain/pallets/outbound-queue/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]>
use super::*;

use bridge_hub_common::AggregateMessageOrigin;
use codec::Encode;
use cumulus_primitives_core::AggregateMessageOrigin;
use frame_benchmarking::v2::*;
use snowbridge_core::{
outbound::{Command, Initializer},
Expand Down Expand Up @@ -36,7 +36,7 @@ mod benchmarks {
}),
},
};
let origin = AggregateMessageOrigin::GeneralKey([1; 32]);
let origin = AggregateMessageOrigin::Snowbridge([1; 32]);
let encoded_enqueued_message = enqueued_message.encode();

#[block]
Expand Down
2 changes: 1 addition & 1 deletion parachain/pallets/outbound-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ mod mock;
#[cfg(test)]
mod test;

use bridge_hub_common::AggregateMessageOrigin;
use codec::Decode;
use cumulus_primitives_core::AggregateMessageOrigin;
use frame_support::{
storage::StorageStreamIter,
traits::{tokens::Balance, EnqueueMessage, Get, ProcessMessageError},
Expand Down
4 changes: 2 additions & 2 deletions parachain/pallets/outbound-queue/src/send_message_impl.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Implementation for [`snowbridge_core::outbound::SendMessage`]
use super::*;
use bridge_hub_common::AggregateMessageOrigin;
use codec::Encode;
use cumulus_primitives_core::AggregateMessageOrigin;
use frame_support::{
ensure,
traits::{EnqueueMessage, Get},
Expand Down Expand Up @@ -71,7 +71,7 @@ where
}

fn deliver(ticket: Self::Ticket) -> Result<H256, SendError> {
let origin = AggregateMessageOrigin::GeneralKey(ticket.channel_id.into());
let origin = AggregateMessageOrigin::Snowbridge(ticket.channel_id.into());

if ticket.channel_id != PRIMARY_GOVERNANCE_CHANNEL {
ensure!(!Self::operating_mode().is_halted(), SendError::Halted);
Expand Down
4 changes: 2 additions & 2 deletions parachain/pallets/outbound-queue/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn process_message_yields_on_max_messages_per_block() {
}

let channel_id: ChannelId = ParaId::from(1000).into();
let origin = AggregateMessageOrigin::GeneralKey(channel_id.into());
let origin = AggregateMessageOrigin::Snowbridge(channel_id.into());
let message = QueuedMessage {
id: Default::default(),
channel_id,
Expand All @@ -114,7 +114,7 @@ fn process_message_fails_on_overweight_message() {
new_tester().execute_with(|| {
let sibling_id = 1000;
let channel_id: ChannelId = ParaId::from(sibling_id).into();
let origin = AggregateMessageOrigin::GeneralKey(channel_id.into());
let origin = AggregateMessageOrigin::Snowbridge(channel_id.into());
let message = mock_message(sibling_id).encode();
let mut meter = WeightMeter::with_limit(Weight::from_parts(1, 1));
assert_noop!(
Expand Down
17 changes: 9 additions & 8 deletions relayer/contracts/beefy_client.go

Large diffs are not rendered by default.

0 comments on commit 999d20d

Please sign in to comment.