aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index 15207f89e1..9499862210 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -210,6 +210,11 @@ struct CExtPubKey {
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
bool Derive(CExtPubKey& out, unsigned int nChild) const;
+ void Serialize(CSizeComputer& s) const
+ {
+ // Optimized implementation for ::GetSerializeSize that avoids copying.
+ s.seek(BIP32_EXTKEY_SIZE + 1); // add one byte for the size (compact int)
+ }
template <typename Stream>
void Serialize(Stream& s) const
{