Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solana-ibc: remove unused storage fields #99

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ impl ClientExecutionContext for IbcStorage<'_, '_> {
)?;
let key = path.0.to_string();
store.private.clients.insert(key.clone(), serialized);
store.private.client_id_set.push(key);
Ok(())
}

Expand All @@ -71,7 +70,6 @@ impl ClientExecutionContext for IbcStorage<'_, '_> {
let height = Height::new(path.epoch, path.height)?;
let key = (path.client_id.to_string(), height);
store.private.consensus_states.insert(key, serialized);
store.private.height = height;
Ok(())
}

Expand Down Expand Up @@ -299,7 +297,6 @@ impl ExecutionContext for IbcStorage<'_, '_> {
)?;
let key = (path.0.to_string(), path.1.to_string());
store.private.channel_ends.insert(key.clone(), serialized);
store.private.port_channel_id_set.push(key);
Ok(())
}

Expand Down
11 changes: 0 additions & 11 deletions solana/solana-ibc/programs/solana-ibc/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,30 +82,19 @@ pub struct IBCPackets(pub Vec<PacketMsg>);
/// All the structs from IBC are stored as String since they dont implement
/// AnchorSerialize and AnchorDeserialize
pub(crate) struct PrivateStorage {
pub height: Height,
pub clients: BTreeMap<InnerClientId, InnerClient>,
/// The client ids of the clients.
pub client_id_set: Vec<InnerClientId>,
pub client_counter: u64,
pub client_processed_times:
BTreeMap<InnerClientId, BTreeMap<Height, SolanaTimestamp>>,
pub client_processed_heights:
BTreeMap<InnerClientId, BTreeMap<Height, HostHeight>>,
pub consensus_states:
BTreeMap<(InnerClientId, Height), InnerConsensusState>,
/// This collection contains the heights corresponding to all consensus states of
/// all clients stored in the contract.
pub client_consensus_state_height_sets:
BTreeMap<InnerClientId, Vec<Height>>,
/// The connection ids of the connections.
pub connection_id_set: Vec<InnerConnectionId>,
pub connection_counter: u64,
pub connections: BTreeMap<InnerConnectionId, InnerConnectionEnd>,
pub channel_ends: BTreeMap<(InnerPortId, InnerChannelId), InnerChannelEnd>,
// Contains the client id corresponding to the connectionId
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,

/// The sequence numbers of the packet commitments.
Expand Down
Loading