| 5723 | } |
| 5724 | |
| 5725 | bool LoadBlockIndex() |
| 5726 | { |
| 5727 | // Load block index from databases |
| 5728 | bool needs_init = fReindex; |
| 5729 | if (!fReindex) { |
| 5730 | bool ret = LoadBlockIndexDB(); |
| 5731 | if (!ret) return false; |
| 5732 | needs_init = mapBlockIndex.empty(); |
| 5733 | } |
| 5734 | if (needs_init) { |
| 5735 | // Use the provided setting for -logevents in the new database |
| 5736 | fLogEvents = GetBoolArg("-logevents", DEFAULT_LOGEVENTS); |
| 5737 | pblocktree->WriteFlag("logevents", fLogEvents); |
| 5738 | } |
| 5739 | return true; |
| 5740 | } |
| 5741 | |
| 5742 | |
| 5743 | bool InitBlockIndex(const CChainParams& chainparams) |
no test coverage detected