aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2016-10-28 16:51:33 -0700
committerPieter Wuille <[email protected]>2016-11-07 13:56:22 -0800
commit657e05ab2e87ff725723fe8a375fc3f8aad02126 (patch)
treee20cebbde1dee31d6d21dccdaa2223a5ca1566e3 /src/pubkey.h
parentMake nType and nVersion private and sometimes const (diff)
downloaddiscoin-657e05ab2e87ff725723fe8a375fc3f8aad02126.tar.xz
discoin-657e05ab2e87ff725723fe8a375fc3f8aad02126.zip
Make GetSerializeSize a wrapper on top of CSizeComputer
Given that in default GetSerializeSize implementations created by ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid of the specialized GetSerializeSize methods everywhere, and just use CSizeComputer. This removes a lot of code which isn't actually used anywhere. For CCompactSize and CVarInt this actually removes a more efficient size computing algorithm, which is brought back in a later commit.
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index 3a554877f..3277218bb 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -116,10 +116,6 @@ public:
}
//! Implement serialization, as if this was a byte vector.
- unsigned int GetSerializeSize(int nType, int nVersion) const
- {
- return size() + 1;
- }
template <typename Stream>
void Serialize(Stream& s, int nType, int nVersion) const
{
@@ -214,10 +210,6 @@ struct CExtPubKey {
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
bool Derive(CExtPubKey& out, unsigned int nChild) const;
- unsigned int GetSerializeSize(int nType, int nVersion) const
- {
- return BIP32_EXTKEY_SIZE+1; //add one byte for the size (compact int)
- }
template <typename Stream>
void Serialize(Stream& s, int nType, int nVersion) const
{