Closed roeierez closed 4 years ago
Is there meant to be a PR to lnd
that exposes this information? Otherwise as is, it's dead code.
This addition will enable LND to update the hint cache during the scanning progress resulting in better incremental rescan between restarts.
Will this be made as a follow up PR?
Will this be made as a follow up PR?
Yes, I actually have it almost ready.
Looks good! Last missing piece is to add/modify existing unit test to check that the progess callback works as expected 👍
Tests updated.
This PR suggests to add progress notifications to the utxo scanning process. Currently the caller only gets feedback at the end of the process where it can be sometimes very long. Besides the feedback there is a need to be able to start the scanning from the last point it has stopped. This is achieved in LND, for example, by using a "SpendHint" cache but it only updates the cache at the end of the process which creates a problem for mobile users that don't open their app for several weeks. The utxo scanning at this case is likely to be longer than the time their app will be online resulting in scanning all over again on every restart. This addition will enable LND to update the hint cache during the scanning progress resulting in better incremental rescan between restarts.