Skip to content
Open
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
2 changes: 1 addition & 1 deletion rust/src/cosmos.ics23.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub struct ProofSpec {
pub struct InnerSpec {
/// Child order is the ordering of the children node, must count from 0
/// iavl tree is \[0, 1\] (left then right)
/// merk is \[0, 2, 1\] (left, right, here)
/// merk is \[0, 1, 2\] (left, here, right)
#[prost(int32, repeated, tag = "1")]
pub child_order: ::prost::alloc::vec::Vec<i32>,
#[prost(int32, tag = "2")]
Expand Down
4 changes: 2 additions & 2 deletions rust/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ fn ensure_right_most(spec: &ics23::InnerSpec, path: &[ics23::InnerOp]) -> Result
// ensure every step has a prefix and suffix defined to be rightmost, unless it is a placeholder node
for step in path {
if !has_padding(step, &pad) && !right_branches_are_empty(spec, step)? {
bail!("step not leftmost")
bail!("step not rightmost")
}
}
Ok(())
Expand Down Expand Up @@ -344,7 +344,7 @@ fn right_branches_are_empty(spec: &ics23::InnerSpec, op: &ics23::InnerOp) -> Res
if right_branches == 0 {
return Ok(false);
}
if op.suffix.len() != spec.child_size as usize {
if op.suffix.len() != right_branches * spec.child_size as usize {
return Ok(false);
}
for i in 0..right_branches {
Expand Down