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
|
// primary actions
|
||||||
SER_NETWORK = (1 << 0),
|
SER_NETWORK = (1 << 0),
|
||||||
SER_DISK = (1 << 1),
|
SER_DISK = (1 << 1),
|
||||||
SER_GETHASH = (1 << 2),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -123,20 +123,14 @@ public:
|
||||||
template<typename Stream>
|
template<typename Stream>
|
||||||
void Serialize(Stream& s) const
|
void Serialize(Stream& s) const
|
||||||
{
|
{
|
||||||
int nVersion = s.GetVersion();
|
s << int{259900}; // Unused field, writes the highest client version ever written
|
||||||
if (!(s.GetType() & SER_GETHASH)) {
|
|
||||||
s << nVersion;
|
|
||||||
}
|
|
||||||
s << nTime << vchPubKey << fInternal << m_pre_split;
|
s << nTime << vchPubKey << fInternal << m_pre_split;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Stream>
|
template<typename Stream>
|
||||||
void Unserialize(Stream& s)
|
void Unserialize(Stream& s)
|
||||||
{
|
{
|
||||||
int nVersion = s.GetVersion();
|
s >> int{}; // Discard unused field
|
||||||
if (!(s.GetType() & SER_GETHASH)) {
|
|
||||||
s >> nVersion;
|
|
||||||
}
|
|
||||||
s >> nTime >> vchPubKey;
|
s >> nTime >> vchPubKey;
|
||||||
try {
|
try {
|
||||||
s >> fInternal;
|
s >> fInternal;
|
||||||
|
|
Loading…
Add table
Reference in a new issue