-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Bug in next_consensus_state
The following comparison should be reversed.
basecoin-rs/basecoin/modules/src/ibc/client_contexts.rs
Lines 201 to 203 in 57f47f2
if height > &IbcHeight::new(path.revision_number, path.revision_height).unwrap() { | |
return Some(path); | |
} |
Refactor prev_consensus_state
We can simplify the prev_consensus_state
as next_consensus_state
if we reverse the iterator here.
let pos = keys.iter().position(|path| { |
Apart from that, next_consensus_state
and prev_consensus_state
- both cases, we are trying to find a partition point. Considering the keys are sorted, we may want to use partition_point.
Metadata
Metadata
Assignees
Labels
No labels