Skip to content

Commit

Permalink
zcash_client_sqlite: Note selection requires commitment tree position…
Browse files Browse the repository at this point in the history
…s to be known.

Fixes zcash#895
  • Loading branch information
nuttycom committed Aug 16, 2023
1 parent 39df175 commit ff2e257
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zcash_client_sqlite/src/wallet/sapling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub(crate) fn get_spendable_sapling_notes(
FROM sapling_received_notes
INNER JOIN transactions ON transactions.id_tx = sapling_received_notes.tx
WHERE account = :account
AND commitment_tree_position IS NOT NULL
AND spent IS NULL
AND transactions.block <= :anchor_height
AND id_note NOT IN rarray(:exclude)
Expand Down Expand Up @@ -231,6 +232,7 @@ pub(crate) fn select_spendable_sapling_notes(
INNER JOIN transactions
ON transactions.id_tx = sapling_received_notes.tx
WHERE account = :account
AND commitment_tree_position IS NOT NULL
AND spent IS NULL
AND transactions.block <= :anchor_height
AND id_note NOT IN rarray(:exclude)
Expand Down

0 comments on commit ff2e257

Please sign in to comment.