-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch UTXO set read errors and shutdown #5619
Conversation
58f3272
to
62bc982
Compare
try { | ||
return CCoinsViewBacked::GetCoins(txid, coins); | ||
} catch(const std::runtime_error& e) { | ||
uiInterface.ThreadSafeMessageBox(strprintf("Error reading from database (%s), shutting down.", e.what()), "", CClientUIInterface::MSG_ERROR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can leave out the detailed error message in the UI. Just log it to debug.log for troubleshooting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message also needs a _() for translation.
tested ACK |
utACK |
13cdce4 Catch UTXO set read errors and shutdown (Pieter Wuille)
After the fact ninja ACK. (seems to successfully shut down on my faulty test host) |
Github-Pull: bitcoin#5619 Rebased-From: 13cdce4 (cherry picked from commit 4e7c219)
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.