Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #684 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 17 17
Lines 767 767
=======================================
Hits 766 766
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
srdtrk
reviewed
Oct 15, 2025
Member
srdtrk
left a comment
There was a problem hiding this comment.
Thanks for this. I added my comments
| /// Returns a `Status` error if any transaction ID is not exactly 32 bytes | ||
| #[inline] | ||
| #[allow(clippy::result_large_err)] | ||
| pub fn parse_eth_tx_hashes(tx_ids: Vec<Vec<u8>>) -> Result<Vec<[u8; 32]>, Status> { |
Member
There was a problem hiding this comment.
Isn't it better to return TxHash?
| .into_iter() | ||
| .map(Hash::try_from) | ||
| .collect::<Result<Vec<_>, _>>() | ||
| .map_err(|e| Status::from_error(e.into())) |
Member
There was a problem hiding this comment.
probably should use to_tonic_status from above.
| .map_err(|tx| format!("invalid tx hash: {tx:?}")) | ||
| }) | ||
| .collect::<Result<Vec<[u8; 32]>, _>>() | ||
| .map_err(|e| Status::from_error(e.into())) |
Member
There was a problem hiding this comment.
ditto: probably should use to_tonic_status
| /// | ||
| /// Returns a `ClientState` with default trust level, max clock drift, and the provided proof specs | ||
| #[must_use] | ||
| pub fn build_tendermint_client_state( |
Member
There was a problem hiding this comment.
Maybe this function should also take trust_level: Option<Fraction> and max_clock_drift: Option<Duration>.
And if these fields are None, then we use the default values?
| unused_crate_dependencies | ||
| )] | ||
|
|
||
| use tendermint as _; |
Comment on lines
+11
to
+13
| use ics23 as _; | ||
| use tendermint as _; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reduced code duplication
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
godoccomments.Files changedin the GitHub PR explorer.SonarCloud Reportin the comment section below once CI passes.