Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zcash_client_sqlite: Fix bug in
utxos_to_txos
migration
72d8df8 altered the `v_received_notes` view to include transparent coins (renaming it to `v_received_outputs`), and updated `v_transactions` to not separately query transparent coins. The latter queried `v_received_notes` twice, once to fetch notes received in a transaction, and again to fetch notes spent in a transaction. The spent notes were obtained by joining on the junction table `v_received_note_spends` to get the spent-in transaction's ID. The commit retained the junction table join, but didn't use it due to a typo, leading to notes being "spent-in" the transaction they were received in. This bug had several effects: - `account_balance_delta` showed `+change` for transactions in which a change note was received that had not yet been spent. - `account_balance_delta` showed `0` for transactions in which all received notes had been subsequently spent. - Transactions that spent funds with no change were omitted.
- Loading branch information