zingolabs / zingolib

An API and test-app that exposes zcash functionality for app consumption
MIT License
15 stars 23 forks source link

don't touch send flow this time #1537

Closed AloeareV closed 1 week ago

AloeareV commented 1 week ago

Instead of messing up send flow when this rescan doesn't update obsolete metadata, only add the check to the rescan flow and not the send flow.

zancas commented 1 week ago

I see that this constrains extension of output indexes to only be from confirmed transactions. I understand this to exclude data from "the send flow" is that how to interpret the title of this commit?

AloeareV commented 5 days ago

I see that this constrains extension of output indexes to only be from confirmed transactions. I understand this to exclude data from "the send flow" is that how to interpret the title of this commit?

No, the original attempt at this added the new code inside get_spendable_note_ids_and_values, which was called during the send flow as well as inside unindexed_records. The reason we only check confirmed notes, is that this code is only called when we read old transactions from the wallet, that are missing information. Unconfimed notes don't need to be rescanned (they're too new to be able to hit this clause, and even if they could they're also gonna be rescanned on confirmation anyway.)