librustzcash
librustzcash copied to clipboard
`zcash_client_backend`: Purge cache_db as scanning progresses
As a developer I would like librustzcash to use the least disk space as possible.
Currently the scan_blocks function takes both cache_db and wallet_db files but only manages the latter. Scanning should also take care of purging the cache so that only the needed compact blocks remained cached (if any).
Possible impacts:
- Reorg handling and rewind (rescan wallet) might be impacted since rewinding to a given height might need the previous block to be already cached and that is currently always true
- Depending on how the client downloads and scans, there might be concurrency problems