Remove SER_GETHASH, hard-code client version in CKeyPool serialize

It was never set, so it can be removed along with any code reading it.
pull/28508/head
MarcoFalke 1 year ago
parent fa72f09d6f
commit fac29a0ab1
No known key found for this signature in database

@ -131,7 +131,6 @@ enum
// primary actions
SER_NETWORK = (1 << 0),
SER_DISK = (1 << 1),
SER_GETHASH = (1 << 2),
};
/**

@ -123,20 +123,14 @@ public:
template<typename Stream>
void Serialize(Stream& s) const
{
int nVersion = s.GetVersion();
if (!(s.GetType() & SER_GETHASH)) {
s << nVersion;
}
s << int{259900}; // Unused field, writes the highest client version ever written
s << nTime << vchPubKey << fInternal << m_pre_split;
}
template<typename Stream>
void Unserialize(Stream& s)
{
int nVersion = s.GetVersion();
if (!(s.GetType() & SER_GETHASH)) {
s >> nVersion;
}
s >> int{}; // Discard unused field
s >> nTime >> vchPubKey;
try {
s >> fInternal;

Loading…
Cancel
Save