Skip to content

Commit

Permalink
Fixes fo ro/wo bridge (paritytech#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur authored and serban300 committed Apr 8, 2024
1 parent a344b2e commit 2ad973a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bridges/primitives/chain-bridge-hub-wococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Parachain for BridgeHubWococo {
}

/// Identifier of BridgeHubWococo in the Wococo relay chain.
pub const BRIDGE_HUB_WOCOCO_PARACHAIN_ID: u32 = 1013;
pub const BRIDGE_HUB_WOCOCO_PARACHAIN_ID: u32 = 1014;

/// Name of the With-BridgeHubWococo messages pallet instance that is deployed at bridged chains.
pub const WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME: &str = "BridgeWococoMessages";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub enum BridgeParachainCall {
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeWococoMessagesCall {
#[codec(index = 5)]
#[codec(index = 2)]
receive_messages_proof(
relay_substrate_client::AccountIdOf<bp_bridge_hub_wococo::BridgeHubWococo>,
bridge_runtime_common::messages::target::FromBridgedChainMessagesProof<
Expand All @@ -128,7 +128,7 @@ pub enum BridgeWococoMessagesCall {
bp_messages::Weight,
),

#[codec(index = 6)]
#[codec(index = 3)]
receive_messages_delivery_proof(
bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof<
relay_substrate_client::HashOf<bp_bridge_hub_wococo::BridgeHubWococo>,
Expand All @@ -140,7 +140,7 @@ pub enum BridgeWococoMessagesCall {
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeRococoMessagesCall {
#[codec(index = 5)]
#[codec(index = 2)]
receive_messages_proof(
relay_substrate_client::AccountIdOf<bp_bridge_hub_rococo::BridgeHubRococo>,
bridge_runtime_common::messages::target::FromBridgedChainMessagesProof<
Expand All @@ -150,7 +150,7 @@ pub enum BridgeRococoMessagesCall {
bp_messages::Weight,
),

#[codec(index = 6)]
#[codec(index = 3)]
receive_messages_delivery_proof(
bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof<
relay_substrate_client::HashOf<bp_bridge_hub_rococo::BridgeHubRococo>,
Expand Down
3 changes: 0 additions & 3 deletions bridges/relays/client-substrate/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ pub enum Error {
/// The response from the server could not be SCALE decoded.
#[error("Response parse failed: {0}")]
ResponseParseFailed(#[from] codec::Error),
/// The Substrate bridge pallet has not yet been initialized.
#[error("The Substrate bridge pallet has not been initialized yet.")]
UninitializedBridgePallet,
/// Account does not exist on the chain.
#[error("Account does not exist on the chain.")]
AccountDoesNotExist,
Expand Down
4 changes: 2 additions & 2 deletions bridges/relays/client-substrate/src/transaction_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ mod tests {
&self,
_hash: HashOf<TestChain>,
) -> Result<HeaderIdOf<TestChain>, Error> {
self.0.as_ref().map_err(|_| Error::UninitializedBridgePallet).cloned()
self.0.as_ref().map_err(|_| Error::BridgePalletIsNotInitialized).cloned()
}
}

Expand Down Expand Up @@ -338,7 +338,7 @@ mod tests {
async fn returns_lost_on_finalized_and_environment_error() {
assert_eq!(
watch_transaction_status::<_, TestChain, _>(
TestEnvironment(Err(Error::UninitializedBridgePallet)),
TestEnvironment(Err(Error::BridgePalletIsNotInitialized)),
Default::default(),
futures::stream::iter([TransactionStatus::Finalized(Default::default())])
)
Expand Down

0 comments on commit 2ad973a

Please sign in to comment.