@@ -26,13 +26,7 @@ class COutPoint
2626 COutPoint (): n(NULL_INDEX) { }
2727 COutPoint (const uint256& hashIn, uint32_t nIn): hash(hashIn), n(nIn) { }
2828
29- ADD_SERIALIZE_METHODS;
30-
31- template <typename Stream, typename Operation>
32- inline void SerializationOp (Stream& s, Operation ser_action) {
33- READWRITE (hash);
34- READWRITE (n);
35- }
29+ SERIALIZE_METHODS (COutPoint, obj) { READWRITE (obj.hash , obj.n ); }
3630
3731 void SetNull () { hash.SetNull (); n = NULL_INDEX; }
3832 bool IsNull () const { return (hash.IsNull () && n == NULL_INDEX); }
@@ -103,14 +97,7 @@ class CTxIn
10397 explicit CTxIn (COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=SEQUENCE_FINAL);
10498 CTxIn (uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=SEQUENCE_FINAL);
10599
106- ADD_SERIALIZE_METHODS;
107-
108- template <typename Stream, typename Operation>
109- inline void SerializationOp (Stream& s, Operation ser_action) {
110- READWRITE (prevout);
111- READWRITE (scriptSig);
112- READWRITE (nSequence);
113- }
100+ SERIALIZE_METHODS (CTxIn, obj) { READWRITE (obj.prevout , obj.scriptSig , obj.nSequence ); }
114101
115102 friend bool operator ==(const CTxIn& a, const CTxIn& b)
116103 {
@@ -143,13 +130,7 @@ class CTxOut
143130
144131 CTxOut (const CAmount& nValueIn, CScript scriptPubKeyIn);
145132
146- ADD_SERIALIZE_METHODS;
147-
148- template <typename Stream, typename Operation>
149- inline void SerializationOp (Stream& s, Operation ser_action) {
150- READWRITE (nValue);
151- READWRITE (scriptPubKey);
152- }
133+ SERIALIZE_METHODS (CTxOut, obj) { READWRITE (obj.nValue , obj.scriptPubKey ); }
153134
154135 void SetNull ()
155136 {
0 commit comments