Explicitly mark Txs as fully scanned

This commit is contained in:
Aditya Kulkarni
2019-09-25 13:42:00 -07:00
parent 5b02282a66
commit df12ccf317
3 changed files with 25 additions and 26 deletions

View File

@@ -612,6 +612,9 @@ impl LightWallet {
}
}
// TODO: Scan t outputs if we spent t or z funds in this Tx, and add it to the
// outgoing metadata
// Scan shielded sapling outputs to see if anyone of them is us, and if it is, extract the memo
for output in tx.shielded_outputs.iter() {
let ivks: Vec<_> = self.extfvks.iter().map(|extfvk| extfvk.fvk.vk.ivk()).collect();
@@ -693,6 +696,13 @@ impl LightWallet {
};
}
}
// Mark this Tx as scanned
{
let mut txs = self.txs.write().unwrap();
let mut wtx = txs.get_mut(&tx.txid()).unwrap();
wtx.full_tx_scanned = true;
}
}
// Invalidate all blocks including and after "at_height".