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.
This commit is contained in:
MarcoFalke
2023-09-11 16:12:34 +00:00
parent fa72f09d6f
commit fac29a0ab1
2 changed files with 2 additions and 9 deletions

View File

@@ -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;