-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Description
Originally posted by @S3RK in #24984 (review)
With current implementation we don't save the rescan progress and on the next load we will have to start from scratch. Is it possible to save the last processed blocked at shutdown?
It would be nice if wallet code would call WriteBestBlock and save the last scan position if it is interrupted during a sync. This could be implemented by trying to save the scan position during the shutdown, or by just periodically saving the scan position after an interval, similar to indexing code which saves sync position once every 30 seconds:
Lines 170 to 175 in f0a834e
| if (last_locator_write_time + SYNC_LOCATOR_WRITE_INTERVAL < current_time) { | |
| SetBestBlockIndex(pindex); | |
| last_locator_write_time = current_time; | |
| // No need to handle errors in Commit. See rationale above. | |
| Commit(); | |
| } |
Metadata
Metadata
Assignees
Labels
No labels