This is a minimally invasive patch to shutdown on LevelDB read errors from the chainstate. The block index does not need similar protection, as it’s only read at startup.
Should apply cleanly to 0.10 as well.
This is a minimally invasive patch to shutdown on LevelDB read errors from the chainstate. The block index does not need similar protection, as it’s only read at startup.
Should apply cleanly to 0.10 as well.
117+ CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {}
118+ bool GetCoins(const uint256 &txid, CCoins &coins) const {
119+ try {
120+ return CCoinsViewBacked::GetCoins(txid, coins);
121+ } catch(const std::runtime_error& e) {
122+ uiInterface.ThreadSafeMessageBox(strprintf("Error reading from database (%s), shutting down.", e.what()), "", CClientUIInterface::MSG_ERROR);