aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2019-10-22 00:07:31 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2019-10-22 00:07:31 +0200
commit5b44a75493a1a098404d5e21dc384e74eae1892e (patch)
treefc4d1b067682421a53f105b3377879805713a7dd /src/key.h
parenta22b62481aae95747830bd3c0db3227860b12d8e (diff)
downloadbitcoin-5b44a75493a1a098404d5e21dc384e74eae1892e.tar.xz
refactor: Remove unused CExt{Pub,}Key (de)serialization methods
The serialization/deserialization methods for the classes CExtKey and CExtPubKey were only used in the BIP32 unit tests, where the relevant parts are removed as well.
Diffstat (limited to 'src/key.h')
-rw-r--r--src/key.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/key.h b/src/key.h
index 67e2cfc094..6a86b0411d 100644
--- a/src/key.h
+++ b/src/key.h
@@ -162,25 +162,6 @@ struct CExtKey {
bool Derive(CExtKey& out, unsigned int nChild) const;
CExtPubKey Neuter() const;
void SetSeed(const unsigned char* seed, unsigned int nSeedLen);
- template <typename Stream>
- void Serialize(Stream& s) const
- {
- unsigned int len = BIP32_EXTKEY_SIZE;
- ::WriteCompactSize(s, len);
- unsigned char code[BIP32_EXTKEY_SIZE];
- Encode(code);
- s.write((const char *)&code[0], len);
- }
- template <typename Stream>
- void Unserialize(Stream& s)
- {
- unsigned int len = ::ReadCompactSize(s);
- unsigned char code[BIP32_EXTKEY_SIZE];
- if (len != BIP32_EXTKEY_SIZE)
- throw std::runtime_error("Invalid extended key size\n");
- s.read((char *)&code[0], len);
- Decode(code);
- }
};
/** Initialize the elliptic curve support. May not be called twice without calling ECC_Stop first. */