-
Notifications
You must be signed in to change notification settings - Fork 268
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
zcash_client_sqlite: Fix invalid attempt to derive Sapling receivers in gap limit handling migration. #1752
Conversation
…er where there may be none. This fixes an error in the `transparent_gap_limit_handling` migration, whereby wallets that received Orchard outputs at diversifier indices for which no Sapling receivers could exist would incorrectly attempt to derive UAs containing sapling receivers at those indices.
@@ -480,7 +480,7 @@ impl<P: consensus::Parameters, C: Clock, R: RngCore> RusqliteMigration for Migra | |||
.expect("previously generated an address"), | |||
) | |||
.expect("roundtrip"); | |||
let ua = uivk.address(di, UnifiedAddressRequest::AllAvailableKeys)?; | |||
let ua = uivk.address(di, UnifiedAddressRequest::ALLOW_ALL)?; |
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 change is safe, because the migration will either have succeeded with AllAvailableKeys
, or it will have failed in which case the migration will not have been applied and will re-run with the correction the next time the wallet starts up.
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 change is also safe because it is only used in the context of diversifiers derived from either Sapling or Orchard receivers, ensuring that the resulting UA will contain a shielded receiver.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1752 +/- ##
=======================================
Coverage 53.88% 53.88%
=======================================
Files 179 179
Lines 21531 21531
=======================================
Hits 11602 11602
Misses 9929 9929 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 4b75b47
Published 7dcdc4c as |
4b75b47
to
accf78f
Compare
No description provided.