Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibc: start commitment_idx in packet commitment query at 1 to match ibc spec #2816

Merged
merged 1 commit into from
Jul 11, 2023
Merged
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
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
Loading