-
Notifications
You must be signed in to change notification settings - Fork 253
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
: Add Orchard wallet support
#1182
Conversation
614a424
to
c118979
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1182 +/- ##
==========================================
- Coverage 63.38% 63.30% -0.08%
==========================================
Files 120 121 +1
Lines 13124 13450 +326
==========================================
+ Hits 8318 8514 +196
- Misses 4806 4936 +130 ☔ View full report in Codecov by Sentry. |
fc37367
to
464bcf7
Compare
zcash_client_sqlite
: Add support for Orchard scanning to the scan queue.zcash_client_sqlite
: Add Orchard wallet support
ebe35e7
to
bc0507b
Compare
8f58e9e
to
7a48efb
Compare
zcash_client_sqlite/src/wallet.rs
Outdated
"UPDATE sapling_received_notes SET spent = NULL WHERE EXISTS ( | ||
SELECT id_tx FROM transactions | ||
WHERE id_tx = sapling_received_notes.spent AND block IS NULL AND expiry_height < ? | ||
)", | ||
)?; | ||
stmt_update_expired.execute([u32::from(expiry_height)])?; | ||
stmt_update_sapling_expired.execute([u32::from(expiry_height)])?; | ||
let mut stmt_update_orchard_expired = conn.prepare_cached( |
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 technically isn't necessary unless the orchard
feature is enabled. It is, however, safe regardless.
7a48efb
to
95d3c85
Compare
95d3c85
to
0084326
Compare
68667c4
to
4ef9452
Compare
48ab24b
to
a017717
Compare
0036600
to
e61fd81
Compare
d260064
to
08d131b
Compare
8cd2f2b
to
52257f3
Compare
b32d449
to
85932db
Compare
…ights for the anchor.
…apling and Orchard.
…uture Sapling flagging.
1156263
to
d68a01a
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.
Reviewed d68a01a
) | ||
)?); | ||
#[cfg(feature = "orchard")] | ||
let received_iter = received_iter.chain(wallet::orchard::select_spendable_orchard_notes( |
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 is ignoring the _sources
parameter to select_spendable_notes
, and always selecting from both pools. It happens to cause no bugs because zcash_client_backend
hard-codes both pools as sources if the feature flags are enabled, but we should fix this anyway.
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 be fixed by the third commit of #1244 (which I'm in the process of extracting out on its own.)
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.
Whether or not we include the third commit of #1244 in Zashi 1.0 (and we might not), we should fix this because it's a bug in the current implementation.
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.
Opened #1260.
97e5e9f
to
264fc95
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.
Reviewed 264fc95.
264fc95
to
9452698
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.
utACK 9452698
… note commitment tree.
Co-authored-by: str4d <[email protected]>
9452698
to
5a28970
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.
Re-utACK 5a28970
Closes #1087.
Closes #1177.