mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
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:
parent
fa72f09d6f
commit
fac29a0ab1
2 changed files with 2 additions and 9 deletions
|
@ -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…
Add table
Reference in a new issue