zcash_client_sqlite: Note selection requires commitment tree positions to be known.
Fixes #895
This commit is contained in:
parent
0e7ee0ebd7
commit
75ca045786
|
@ -150,6 +150,7 @@ pub(crate) fn get_spendable_sapling_notes(
|
||||||
FROM sapling_received_notes
|
FROM sapling_received_notes
|
||||||
INNER JOIN transactions ON transactions.id_tx = sapling_received_notes.tx
|
INNER JOIN transactions ON transactions.id_tx = sapling_received_notes.tx
|
||||||
WHERE account = :account
|
WHERE account = :account
|
||||||
|
AND commitment_tree_position IS NOT NULL
|
||||||
AND spent IS NULL
|
AND spent IS NULL
|
||||||
AND transactions.block <= :anchor_height
|
AND transactions.block <= :anchor_height
|
||||||
AND id_note NOT IN rarray(:exclude)
|
AND id_note NOT IN rarray(:exclude)
|
||||||
|
@ -223,6 +224,7 @@ pub(crate) fn select_spendable_sapling_notes(
|
||||||
INNER JOIN transactions
|
INNER JOIN transactions
|
||||||
ON transactions.id_tx = sapling_received_notes.tx
|
ON transactions.id_tx = sapling_received_notes.tx
|
||||||
WHERE account = :account
|
WHERE account = :account
|
||||||
|
AND commitment_tree_position IS NOT NULL
|
||||||
AND spent IS NULL
|
AND spent IS NULL
|
||||||
AND transactions.block <= :anchor_height
|
AND transactions.block <= :anchor_height
|
||||||
AND id_note NOT IN rarray(:exclude)
|
AND id_note NOT IN rarray(:exclude)
|
||||||
|
|
Loading…
Reference in New Issue