aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-01-28 21:05:11 +0100
committerPieter Wuille <pieterw@google.com>2013-01-28 21:07:56 +0100
commitd0809a1925cfa287339a24c8ef00c708135a067b (patch)
tree82c4ba60756227bee4de95d25b1e42d8932cce20 /src/main.h
parent79bec38cb490a77e9431716245c645d2aa0c0a87 (diff)
downloadbitcoin-d0809a1925cfa287339a24c8ef00c708135a067b.tar.xz
Remove support for pre-checksum undo files
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h12
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;