File tree Expand file tree Collapse file tree 3 files changed +0
-60
lines changed Expand file tree Collapse file tree 3 files changed +0
-60
lines changed Original file line number Diff line number Diff line change @@ -162,25 +162,6 @@ struct CExtKey {
162
162
bool Derive (CExtKey& out, unsigned int nChild) const ;
163
163
CExtPubKey Neuter () const ;
164
164
void SetSeed (const unsigned char * seed, unsigned int nSeedLen);
165
- template <typename Stream>
166
- void Serialize (Stream& s) const
167
- {
168
- unsigned int len = BIP32_EXTKEY_SIZE;
169
- ::WriteCompactSize (s, len);
170
- unsigned char code[BIP32_EXTKEY_SIZE];
171
- Encode (code);
172
- s.write ((const char *)&code[0 ], len);
173
- }
174
- template <typename Stream>
175
- void Unserialize (Stream& s)
176
- {
177
- unsigned int len = ::ReadCompactSize (s);
178
- unsigned char code[BIP32_EXTKEY_SIZE];
179
- if (len != BIP32_EXTKEY_SIZE)
180
- throw std::runtime_error (" Invalid extended key size\n " );
181
- s.read ((char *)&code[0 ], len);
182
- Decode (code);
183
- }
184
165
};
185
166
186
167
/* * Initialize the elliptic curve support. May not be called twice without calling ECC_Stop first. */
Original file line number Diff line number Diff line change @@ -222,31 +222,6 @@ struct CExtPubKey {
222
222
void Encode (unsigned char code[BIP32_EXTKEY_SIZE]) const ;
223
223
void Decode (const unsigned char code[BIP32_EXTKEY_SIZE]);
224
224
bool Derive (CExtPubKey& out, unsigned int nChild) const ;
225
-
226
- void Serialize (CSizeComputer& s) const
227
- {
228
- // Optimized implementation for ::GetSerializeSize that avoids copying.
229
- s.seek (BIP32_EXTKEY_SIZE + 1 ); // add one byte for the size (compact int)
230
- }
231
- template <typename Stream>
232
- void Serialize (Stream& s) const
233
- {
234
- unsigned int len = BIP32_EXTKEY_SIZE;
235
- ::WriteCompactSize (s, len);
236
- unsigned char code[BIP32_EXTKEY_SIZE];
237
- Encode (code);
238
- s.write ((const char *)&code[0 ], len);
239
- }
240
- template <typename Stream>
241
- void Unserialize (Stream& s)
242
- {
243
- unsigned int len = ::ReadCompactSize (s);
244
- unsigned char code[BIP32_EXTKEY_SIZE];
245
- if (len != BIP32_EXTKEY_SIZE)
246
- throw std::runtime_error (" Invalid extended key size\n " );
247
- s.read ((char *)&code[0 ], len);
248
- Decode (code);
249
- }
250
225
};
251
226
252
227
/* * Users of this module must hold an ECCVerifyHandle. The constructor and
Original file line number Diff line number Diff line change @@ -118,22 +118,6 @@ static void RunTest(const TestVector &test) {
118
118
}
119
119
key = keyNew;
120
120
pubkey = pubkeyNew;
121
-
122
- CDataStream ssPub (SER_DISK, CLIENT_VERSION);
123
- ssPub << pubkeyNew;
124
- BOOST_CHECK (ssPub.size () == 75 );
125
-
126
- CDataStream ssPriv (SER_DISK, CLIENT_VERSION);
127
- ssPriv << keyNew;
128
- BOOST_CHECK (ssPriv.size () == 75 );
129
-
130
- CExtPubKey pubCheck;
131
- CExtKey privCheck;
132
- ssPub >> pubCheck;
133
- ssPriv >> privCheck;
134
-
135
- BOOST_CHECK (pubCheck == pubkeyNew);
136
- BOOST_CHECK (privCheck == keyNew);
137
121
}
138
122
}
139
123
You can’t perform that action at this time.
0 commit comments