diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2018-03-05 10:42:26 -0500 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2018-03-05 10:51:29 -0500 |
commit | 0e7c52dc6cbb8fd881a0dd57a6167a812fe71dc4 (patch) | |
tree | b6b91027ec3b8e27f8177f2e8c9ee6b82f681b14 /src/serialize.h | |
parent | 9e2ed253f50500e1db4927d511d3ac0d47aed8df (diff) |
Shut down if trying to connect a corrupted block
The call to CheckBlock() in ConnectBlock() is redundant with calls to it
prior to storing a block on disk. If CheckBlock() fails with an error
indicating the block is potentially corrupted, then shut down
immediately, as this is an indication that the node is experiencing
hardware issues. (If we didn't shut down, we could go into an infinite
loop trying to reconnect this same bad block, as we're not setting the
block's status to FAILED in the case where there is potential
corruption.)
If CheckBlock() fails for some other reason, we'll end up flagging this
block as bad (perhaps some prior software version "let a bad block in",
as the comment indicates), and not trying to connect it again, so this
case should be properly handled.
Diffstat (limited to 'src/serialize.h')
0 files changed, 0 insertions, 0 deletions