-
Notifications
You must be signed in to change notification settings - Fork 251
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
Factor out protocol constants and value types into a zcash_protocol
crate.
#1142
Conversation
bbf1dc8
to
f356fa3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1142 +/- ##
==========================================
- Coverage 64.33% 63.97% -0.36%
==========================================
Files 115 115
Lines 11872 11895 +23
==========================================
- Hits 7638 7610 -28
- Misses 4234 4285 +51 ☔ View full report in Codecov by Sentry. |
f356fa3
to
91a65e3
Compare
ccfd94a
to
f9a900e
Compare
3abc70e
to
1264182
Compare
bd33550
to
234522f
Compare
e387ae2
to
01fd657
Compare
01fd657
to
23bc3fe
Compare
23bc3fe
to
b43bb65
Compare
f2f8af6
to
c4fe5f2
Compare
Co-authored-by: Daira-Emma Hopwood <[email protected]>
c4fe5f2
to
eaabc0f
Compare
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.
Flushing comments.
"Unable to parse raw transaction: {:?}", | ||
e | ||
)) | ||
})?; | ||
let output = tx | ||
.sapling_bundle() | ||
.and_then(|b| b.shielded_outputs().get(output_index)) |
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.
Should the panic just below also be a WalletMigrationError::CorruptedData
return?
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: we sometimes use "string literal".to_owned()
, and sometimes "string literal".to_string()
. They do the same thing, but let's be consistent and use to_owned()
.
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.
We are so totally inconsistent about this that fixing it should be done outside of this PR; I find 70 different occurrences of .to_string
all across the codebase.
@@ -111,7 +109,7 @@ impl<P: consensus::Parameters> RusqliteMigration for Migration<P> { | |||
"Address field value decoded to a transparent address; should have been Sapling or unified.".to_string())); |
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.
"Address field value decoded to a transparent address; should have been Sapling or unified.".to_string())); | |
"Address field value decoded to a transparent address; should have been Sapling or unified.".to_owned())); |
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.
These two are semantically identical.
self.to_unified_full_viewing_key().default_address(request) | ||
self.to_unified_full_viewing_key() | ||
.default_address(request) | ||
.unwrap() |
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.
This should probably be .expect(...)
.
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.
utACK modulo comments.
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.
Re-utACK 376db46
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.
Post-hoc re-ACK 376db46
This is best reviewed commit-by-commit.
Closes #1157.