From ae1db7b08614220c13fc0eb87bbf4c8de64e9552 Mon Sep 17 00:00:00 2001 From: dhruvja Date: Mon, 30 Oct 2023 16:09:09 +0100 Subject: [PATCH 1/2] change client to conn from conn to client --- .../solana-ibc/programs/solana-ibc/src/execution_context.rs | 4 ++-- solana/solana-ibc/programs/solana-ibc/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs b/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs index 0e1121df..0c611172 100644 --- a/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs +++ b/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs @@ -253,8 +253,8 @@ impl ExecutionContext for IbcStorage<'_, '_> { let mut store = self.0.borrow_mut(); store .private - .connection_to_client - .insert(conn_id.to_string(), client_connection_path.0.to_string()); + .client_to_connection + .insert( client_connection_path.0.to_string(), conn_id.to_string(),); Ok(()) } diff --git a/solana/solana-ibc/programs/solana-ibc/src/lib.rs b/solana/solana-ibc/programs/solana-ibc/src/lib.rs index eaa11917..227d7540 100644 --- a/solana/solana-ibc/programs/solana-ibc/src/lib.rs +++ b/solana/solana-ibc/programs/solana-ibc/src/lib.rs @@ -201,7 +201,7 @@ pub struct PrivateStorage { pub connections: BTreeMap, pub channel_ends: BTreeMap<(InnerPortId, InnerChannelId), InnerChannelEnd>, // Contains the client id corresponding to the connectionId - pub connection_to_client: BTreeMap, + pub client_to_connection: BTreeMap, /// The port and channel id tuples of the channels. pub port_channel_id_set: Vec<(InnerPortId, InnerChannelId)>, pub channel_counter: u64, From 0ebe30b11e3f786a9714ddcb25d8132897f03f37 Mon Sep 17 00:00:00 2001 From: dhruvja Date: Mon, 30 Oct 2023 20:18:31 +0100 Subject: [PATCH 2/2] fmt --- solana/solana-ibc/programs/solana-ibc/src/execution_context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs b/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs index 0c611172..89698f3f 100644 --- a/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs +++ b/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs @@ -254,7 +254,7 @@ impl ExecutionContext for IbcStorage<'_, '_> { store .private .client_to_connection - .insert( client_connection_path.0.to_string(), conn_id.to_string(),); + .insert(client_connection_path.0.to_string(), conn_id.to_string()); Ok(()) }