Skip to content

Commit

Permalink
change client to connection from connection to client (#63)
Browse files Browse the repository at this point in the history
We are having a mapping between connectionId to clientId ( connectionId is the key ) but it should be the other way round since we would query the connection using client.

* change client to conn from conn to client

* fmt
  • Loading branch information
dhruvja authored Oct 30, 2023
1 parent caa71df commit 3cf272c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down
2 changes: 1 addition & 1 deletion solana/solana-ibc/programs/solana-ibc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub struct PrivateStorage {
pub connections: BTreeMap<InnerConnectionId, InnerConnectionEnd>,
pub channel_ends: BTreeMap<(InnerPortId, InnerChannelId), InnerChannelEnd>,
// Contains the client id corresponding to the connectionId
pub connection_to_client: BTreeMap<InnerConnectionId, InnerClientId>,
pub client_to_connection: BTreeMap<InnerClientId, InnerConnectionId>,
/// The port and channel id tuples of the channels.
pub port_channel_id_set: Vec<(InnerPortId, InnerChannelId)>,
pub channel_counter: u64,
Expand Down

0 comments on commit 3cf272c

Please sign in to comment.