Skip to content

Commit

Permalink
start commitment_idx in packet commitment query at 1 to match ibc spec
Browse files Browse the repository at this point in the history
  • Loading branch information
avahowell committed Jul 11, 2023
1 parent edbb827 commit 7fabaa9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bin/pd/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ impl Info {
let mut commitment_states = vec![];
let commitment_counter = snapshot.get_send_sequence(&chan_id, &port_id).await?;

for commitment_idx in 0..commitment_counter {
// this starts at 1; the first commitment index is 1 (from ibc spec)
for commitment_idx in 1..commitment_counter {
let commitment = snapshot
.get_packet_commitment_by_id(&chan_id, &port_id, commitment_idx)
.await?
Expand Down

0 comments on commit 7fabaa9

Please sign in to comment.