@@ -31,7 +31,7 @@ class COutPoint
3131 COutPoint () { SetNull (); }
3232 COutPoint (uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
3333
34- IMPLEMENT_SERIALIZE ;
34+ ADD_SERIALIZE_METHODS ;
3535
3636 template <typename Stream, typename Operation>
3737 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -91,7 +91,7 @@ class CTxIn
9191 explicit CTxIn (COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max());
9292 CTxIn (uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<uint32_t >::max());
9393
94- IMPLEMENT_SERIALIZE ;
94+ ADD_SERIALIZE_METHODS ;
9595
9696 template <typename Stream, typename Operation>
9797 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -145,7 +145,7 @@ class CFeeRate
145145 friend bool operator >=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK ; }
146146 std::string ToString () const ;
147147
148- IMPLEMENT_SERIALIZE ;
148+ ADD_SERIALIZE_METHODS ;
149149
150150 template <typename Stream, typename Operation>
151151 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -170,7 +170,7 @@ class CTxOut
170170
171171 CTxOut (int64_t nValueIn, CScript scriptPubKeyIn);
172172
173- IMPLEMENT_SERIALIZE ;
173+ ADD_SERIALIZE_METHODS ;
174174
175175 template <typename Stream, typename Operation>
176176 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -253,18 +253,16 @@ class CTransaction
253253
254254 CTransaction& operator =(const CTransaction& tx);
255255
256- IMPLEMENT_SERIALIZE ;
256+ ADD_SERIALIZE_METHODS ;
257257
258258 template <typename Stream, typename Operation>
259259 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
260- bool fRead = ser_action.ForRead ();
261-
262260 READWRITE (*const_cast <int32_t *>(&this ->nVersion ));
263261 nVersion = this ->nVersion ;
264262 READWRITE (*const_cast <std::vector<CTxIn>*>(&vin));
265263 READWRITE (*const_cast <std::vector<CTxOut>*>(&vout));
266264 READWRITE (*const_cast <uint32_t *>(&nLockTime));
267- if (fRead )
265+ if (ser_action. ForRead () )
268266 UpdateHash ();
269267 }
270268
@@ -313,7 +311,7 @@ struct CMutableTransaction
313311 CMutableTransaction ();
314312 CMutableTransaction (const CTransaction& tx);
315313
316- IMPLEMENT_SERIALIZE ;
314+ ADD_SERIALIZE_METHODS ;
317315
318316 template <typename Stream, typename Operation>
319317 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -342,12 +340,11 @@ class CTxOutCompressor
342340
343341 CTxOutCompressor (CTxOut &txoutIn) : txout(txoutIn) { }
344342
345- IMPLEMENT_SERIALIZE ;
343+ ADD_SERIALIZE_METHODS ;
346344
347345 template <typename Stream, typename Operation>
348346 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
349- bool fRead = ser_action.ForRead ();
350- if (!fRead ) {
347+ if (!ser_action.ForRead ()) {
351348 uint64_t nVal = CompressAmount (txout.nValue );
352349 READWRITE (VARINT (nVal));
353350 } else {
@@ -410,7 +407,7 @@ class CTxUndo
410407 // undo information for all txins
411408 std::vector<CTxInUndo> vprevout;
412409
413- IMPLEMENT_SERIALIZE ;
410+ ADD_SERIALIZE_METHODS ;
414411
415412 template <typename Stream, typename Operation>
416413 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -443,7 +440,7 @@ class CBlockHeader
443440 SetNull ();
444441 }
445442
446- IMPLEMENT_SERIALIZE ;
443+ ADD_SERIALIZE_METHODS ;
447444
448445 template <typename Stream, typename Operation>
449446 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -500,7 +497,7 @@ class CBlock : public CBlockHeader
500497 *((CBlockHeader*)this ) = header;
501498 }
502499
503- IMPLEMENT_SERIALIZE ;
500+ ADD_SERIALIZE_METHODS ;
504501
505502 template <typename Stream, typename Operation>
506503 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -550,7 +547,7 @@ struct CBlockLocator
550547 vHave = vHaveIn;
551548 }
552549
553- IMPLEMENT_SERIALIZE ;
550+ ADD_SERIALIZE_METHODS ;
554551
555552 template <typename Stream, typename Operation>
556553 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
0 commit comments