mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-30 05:52:33 +02: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:
parent
975235ca0a
commit
adf4912d77
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user