mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
node/chainstate: Remove do/while loop
I strongly recommend reviewing with the following git-diff flags: --ignore-space-change
This commit is contained in:
@@ -28,7 +28,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);
|
||||||
chainman.InitializeChainstate(mempool);
|
chainman.InitializeChainstate(mempool);
|
||||||
@@ -161,6 +160,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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user