-
Notifications
You must be signed in to change notification settings - Fork 111
[adb] [sync] rename hash to digest #1299
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
Conversation
…ed nodes correctly
examples/sync/src/bin/client.rs
Outdated
#[derive(Debug)] | ||
struct ServerMetadata { | ||
target_hash: Digest, | ||
root_digest: Digest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having target_
was redundant. These are all parts of the target, not just the hash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could even just call this root
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the type is already Digest, so feels repetitive to include both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed all vars/functions from root_digest
to root
. I left some comments that say "root digest" because there aren't type annotations in the comments. I could also change those to be uniformly "root" if you'd like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fine. Just left 1 nit on the errors.
storage/src/adb/any/sync/mod.rs
Outdated
#[error("Hash mismatch - expected {expected:?}, got {actual:?}")] | ||
HashMismatch { | ||
#[error("Root digest mismatch - expected {expected:?}, got {actual:?}")] | ||
RootDigestMismatch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: RootMismatch
storage/src/adb/any/sync/mod.rs
Outdated
SyncTargetHashUnchanged, | ||
/// Sync target digest unchanged | ||
#[error("Sync target digest unchanged")] | ||
SyncTargetRootDigestUnchanged, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: SyncTargetRootUnchanged
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #1299 +/- ##
==========================================
- Coverage 91.16% 91.16% -0.01%
==========================================
Files 246 246
Lines 61236 61237 +1
==========================================
- Hits 55828 55826 -2
- Misses 5408 5411 +3
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
No description provided.