diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2013-01-29 18:08:12 -0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@exmulti.com> | 2013-01-29 18:08:12 -0800 |
commit | 2835080e164527ecc2db31e68d86ab8a8337c62b (patch) | |
tree | fed6d729de5936b3e0b00293349348fbbc8492bc /src/main.h | |
parent | 699bc3d14d79b5769bbc082e02b25754936d57dc (diff) | |
parent | 8fdc94cc8f0341e96b1edb3a5b56811c0b20bd15 (diff) |
Merge pull request #2231 from sipa/cleanups
Two cleanups before 0.8
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/main.h b/src/main.h index db41584b56..9dbcac0b5a 100644 --- a/src/main.h +++ b/src/main.h @@ -814,22 +814,12 @@ public: uint256 hashChecksum; try { filein >> *this; + filein >> hashChecksum; } catch (std::exception &e) { return error("%s() : deserialize or I/O error", __PRETTY_FUNCTION__); } - // for compatibility with pre-release code that didn't write checksums to undo data - // TODO: replace by a simply 'filein >> hashChecksum' in the above try block - try { - filein >> hashChecksum; - } catch (std::exception &e) { - hashChecksum = 0; - } - uint32_t hashInit = hashChecksum.Get64(0) & 0xFFFFFFFFUL; - if (hashChecksum == 0 || memcmp(&hashInit, pchMessageStart, 4) == 0) - return true; - // Verify checksum CHashWriter hasher(SER_GETHASH, PROTOCOL_VERSION); hasher << hashBlock; |