@@ -154,41 +154,41 @@ class CCoins
154154 }
155155
156156 template <typename Stream>
157- void Serialize (Stream &s, int nType, int nVersion ) const {
157+ void Serialize (Stream &s) const {
158158 unsigned int nMaskSize = 0 , nMaskCode = 0 ;
159159 CalcMaskSize (nMaskSize, nMaskCode);
160160 bool fFirst = vout.size () > 0 && !vout[0 ].IsNull ();
161161 bool fSecond = vout.size () > 1 && !vout[1 ].IsNull ();
162162 assert (fFirst || fSecond || nMaskCode);
163163 unsigned int nCode = 8 *(nMaskCode - (fFirst || fSecond ? 0 : 1 )) + (fCoinBase ? 1 : 0 ) + (fFirst ? 2 : 0 ) + (fSecond ? 4 : 0 );
164164 // version
165- ::Serialize (s, VARINT(this ->nVersion), nType, nVersion );
165+ ::Serialize (s, VARINT(this ->nVersion));
166166 // header code
167- ::Serialize (s, VARINT(nCode), nType, nVersion );
167+ ::Serialize (s, VARINT(nCode));
168168 // spentness bitmask
169169 for (unsigned int b = 0 ; b<nMaskSize; b++) {
170170 unsigned char chAvail = 0 ;
171171 for (unsigned int i = 0 ; i < 8 && 2 +b*8 +i < vout.size (); i++)
172172 if (!vout[2 +b*8 +i].IsNull ())
173173 chAvail |= (1 << i);
174- ::Serialize (s, chAvail, nType, nVersion );
174+ ::Serialize (s, chAvail);
175175 }
176176 // txouts themself
177177 for (unsigned int i = 0 ; i < vout.size (); i++) {
178178 if (!vout[i].IsNull ())
179- ::Serialize (s, CTxOutCompressor(REF(vout[i])), nType, nVersion );
179+ ::Serialize (s, CTxOutCompressor(REF(vout[i])));
180180 }
181181 // coinbase height
182- ::Serialize (s, VARINT(nHeight), nType, nVersion );
182+ ::Serialize (s, VARINT(nHeight));
183183 }
184184
185185 template <typename Stream>
186- void Unserialize (Stream &s, int nType, int nVersion ) {
186+ void Unserialize (Stream &s) {
187187 unsigned int nCode = 0 ;
188188 // version
189- ::Unserialize (s, VARINT(this ->nVersion), nType, nVersion );
189+ ::Unserialize (s, VARINT(this ->nVersion));
190190 // header code
191- ::Unserialize (s, VARINT(nCode), nType, nVersion );
191+ ::Unserialize (s, VARINT(nCode));
192192 fCoinBase = nCode & 1 ;
193193 std::vector<bool > vAvail (2 , false );
194194 vAvail[0 ] = (nCode & 2 ) != 0 ;
@@ -197,7 +197,7 @@ class CCoins
197197 // spentness bitmask
198198 while (nMaskCode > 0 ) {
199199 unsigned char chAvail = 0 ;
200- ::Unserialize (s, chAvail, nType, nVersion );
200+ ::Unserialize (s, chAvail);
201201 for (unsigned int p = 0 ; p < 8 ; p++) {
202202 bool f = (chAvail & (1 << p)) != 0 ;
203203 vAvail.push_back (f);
@@ -209,10 +209,10 @@ class CCoins
209209 vout.assign (vAvail.size (), CTxOut ());
210210 for (unsigned int i = 0 ; i < vAvail.size (); i++) {
211211 if (vAvail[i])
212- ::Unserialize (s, REF(CTxOutCompressor(vout[i])), nType, nVersion );
212+ ::Unserialize (s, REF(CTxOutCompressor(vout[i])));
213213 }
214214 // coinbase height
215- ::Unserialize (s, VARINT(nHeight), nType, nVersion );
215+ ::Unserialize (s, VARINT(nHeight));
216216 Cleanup ();
217217 }
218218
0 commit comments