node/chainstate: Remove do/while loop

This commit is contained in:
Kittywhiskers Van Gogh 2024-10-03 08:33:33 +00:00
parent 2ea1bbc7aa
commit 53231ca29d
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -58,7 +58,6 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
return fReset || fReindexChainState || chainstate->CoinsTip().GetBestBlock().IsNull(); return fReset || fReindexChainState || chainstate->CoinsTip().GetBestBlock().IsNull();
}; };
do {
try { try {
LOCK(cs_main); LOCK(cs_main);
@ -288,6 +287,6 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
LogPrintf("%s\n", e.what()); LogPrintf("%s\n", e.what());
return ChainstateLoadingError::ERROR_GENERIC_BLOCKDB_OPEN_FAILED; return ChainstateLoadingError::ERROR_GENERIC_BLOCKDB_OPEN_FAILED;
} }
} while(false);
return std::nullopt; return std::nullopt;
} }