File tree Expand file tree Collapse file tree 3 files changed +2
-19
lines changed Expand file tree Collapse file tree 3 files changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -146,23 +146,6 @@ class HashWriter
146146 }
147147};
148148
149- class CHashWriter : public HashWriter
150- {
151- private:
152- const int nVersion;
153-
154- public:
155- CHashWriter (int nVersionIn) : nVersion{nVersionIn} {}
156-
157- int GetVersion () const { return nVersion; }
158-
159- template <typename T>
160- CHashWriter& operator <<(const T& obj) {
161- ::Serialize (*this , obj);
162- return (*this );
163- }
164- };
165-
166149/* * Reads data from an underlying stream, while hashing the read data. */
167150template <typename Source>
168151class HashVerifier : public HashWriter
Original file line number Diff line number Diff line change 1010
1111uint256 CBlockHeader::GetHash () const
1212{
13- return (CHashWriter{PROTOCOL_VERSION } << *this ).GetHash ();
13+ return (HashWriter{ } << *this ).GetHash ();
1414}
1515
1616std::string CBlock::ToString () const
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(siphash)
122122 (uint64_t (x+4 )<<32 )|(uint64_t (x+5 )<<40 )|(uint64_t (x+6 )<<48 )|(uint64_t (x+7 )<<56 ));
123123 }
124124
125- CHashWriter ss{CLIENT_VERSION };
125+ HashWriter ss{};
126126 CMutableTransaction tx;
127127 // Note these tests were originally written with tx.nVersion=1
128128 // and the test would be affected by default tx version bumps if not fixed.
You can’t perform that action at this time.
0 commit comments