Any problems seen during deserialization will throw an uncaught exception, crashing the entire bitcoin process. Properly return an error instead, so that we may at least log the error and gracefully shutdown other portions of the app.
Prevent crashes due to missing or corrupted database records #1381
pull jgarzik wants to merge 2 commits into bitcoin:master from jgarzik:check-deser changing 4 files +37 −8-
jgarzik commented at 6:24 PM on May 22, 2012: contributor
-
gavinandresen commented at 6:47 PM on May 22, 2012: contributor
ACK, long overdue. Compiled and ran on my Mac.
-
f94b64c2f3
Prevent crashes due to missing or corrupted database records
Any problems seen during deserialization will throw an uncaught exception, crashing the entire bitcoin process. Properly return an error instead, so that we may at least log the error and gracefully shutdown other portions of the app.
-
8fe791e4e2
Prevent crashes due to missing or corrupted blk????.dat records
In LoadExternalBlockFile(), errors are already caught... silently. Add a warning message, even though we do not abort the program due to load error.
-
jgarzik commented at 7:25 PM on May 22, 2012: contributor
Added new commit, catching deser exceptions for CAutoFile (blknnnn.dat) too.
- jgarzik referenced this in commit 5d0f7c4f47 on May 22, 2012
- jgarzik merged this on May 22, 2012
- jgarzik closed this on May 22, 2012
- coblee referenced this in commit f23e260f17 on Jul 17, 2012
- jgarzik deleted the branch on Aug 24, 2014
- lateminer referenced this in commit b672681748 on Jan 22, 2019
- lateminer referenced this in commit 88256004a3 on May 6, 2020
- DrahtBot locked this on Sep 8, 2021
Contributors