Introduce CHashVerifier to hash read data
commite484652fc36ef7135cf08ad380ea7142b6cbadc0
authorPieter Wuille <pieter.wuille@gmail.com>
Tue, 25 Apr 2017 18:29:14 +0000 (25 11:29 -0700)
committerPieter Wuille <pieter.wuille@gmail.com>
Fri, 26 May 2017 20:24:25 +0000 (26 13:24 -0700)
tree45085d6af75bc045ae486a226c575fef59fd6b22
parentf54580e7e4f225bb615204daef32f72ab8688418
Introduce CHashVerifier to hash read data

This is necessary later, when we drop the nVersion field from the undo
data. At that point deserializing and reserializing the data won't
roundtrip anymore, and thus that approach can't be used to verify
checksums anymore.

With this CHashVerifier approach, we can deserialize while hashing the
exact serialized form that was used. This is both more efficient and
more correct in that case.
src/hash.h
src/validation.cpp