Skip to content

Commit

Permalink
solana-ibc: fix condition to check connection id (#402)
Browse files Browse the repository at this point in the history
Fix the condition to check if the connection id index is more than the
number of conditions.
  • Loading branch information
dhruvja authored Oct 18, 2024
1 parent 0bc98fe commit ceed3e6
Showing 1 changed file with 1 addition and 1 deletion.
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 @@ -558,7 +558,7 @@ pub mod solana_ibc {
let connection_id = ibc::ConnectionId::new(connection_id_idx.into());

// Panic if connection_id doenst exist
if storage.connections.len() >= usize::from(connection_id_idx) {
if storage.connections.len() <= usize::from(connection_id_idx) {
return Err(error!(error::Error::ContextError(
ibc::ContextError::ConnectionError(
ibc::ConnectionError::ConnectionNotFound {
Expand Down

0 comments on commit ceed3e6

Please sign in to comment.