Skip to content

Commit

Permalink
fix condition to check connection id
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvja committed Oct 18, 2024
1 parent 0bc98fe commit 4d4b693
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 4d4b693

Please sign in to comment.