Skip to content

Commit

Permalink
try request height - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Sep 12, 2024
1 parent 636b9f1 commit 6382669
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/core/component/ibc/src/component/rpc/client_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<HI: HostInterface + Send + Sync + 'static> ClientQuery for IbcQuery<HI> {
.map_err(|e| tonic::Status::aborted(format!("couldn't get snapshot: {e}")))?;

self.storage
.snapshot(height.revision_height as u64)
.snapshot(height.revision_height - 1 as u64)
.ok_or(tonic::Status::aborted(format!("invalid height")))?
};

Expand Down Expand Up @@ -146,7 +146,7 @@ impl<HI: HostInterface + Send + Sync + 'static> ClientQuery for IbcQuery<HI> {
.map_err(|e| tonic::Status::aborted(format!("couldn't get snapshot: {e}")))?;

self.storage
.snapshot(height.revision_height as u64)
.snapshot(height.revision_height - 1 as u64)
.ok_or(tonic::Status::aborted(format!("invalid height")))?
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl<HI: HostInterface + Send + Sync + 'static> ConnectionQuery for IbcQuery<HI>
.map_err(|e| tonic::Status::aborted(format!("couldn't get snapshot: {e}")))?;

self.storage
.snapshot(height.revision_height as u64)
.snapshot(height.revision_height - 1 as u64)
.ok_or(tonic::Status::aborted(format!("invalid height")))?
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl<HI: HostInterface + Send + Sync + 'static> ConsensusQuery for IbcQuery<HI>
.map_err(|e| tonic::Status::aborted(format!("couldn't get snapshot: {e}")))?;

self.storage
.snapshot(height.revision_height as u64)
.snapshot(height.revision_height - 1 as u64)
.ok_or(tonic::Status::aborted(format!("invalid height")))?
};

Expand Down Expand Up @@ -551,7 +551,7 @@ impl<HI: HostInterface + Send + Sync + 'static> ConsensusQuery for IbcQuery<HI>
.map_err(|e| tonic::Status::aborted(format!("couldn't get snapshot: {e}")))?;

self.storage
.snapshot(height.revision_height as u64)
.snapshot(height.revision_height - 1 as u64)
.ok_or(tonic::Status::aborted(format!("invalid height")))?
};

Expand Down

0 comments on commit 6382669

Please sign in to comment.