Skip to content

init: Remove retry for loop

The for loop around the chain loading logic in init.cpp allows users of the GUI to retry once on failure with reindexing without having to manually set the reindex flag on startup. However this current mechanism has problems:

Attempt to fix this by moving the bulk of the logic into a separate function and replacing the for loop with a simpler if statement.

The diff's in this pull request are best reviewed with --color-moved-ws=ignore-all-space --color-moved=dimmed-zebra. The error behaviour can be tested by either manually making LoadChainstate return a failure, or deleting some of the block index database files.

Merge request reports

Loading