From fac29a0ab19fda457b55d7a0a37c5cd3d9680f82 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 11 Sep 2023 16:12:34 +0000 Subject: [PATCH] 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. --- src/serialize.h | 1 - src/wallet/scriptpubkeyman.h | 10 ++-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/serialize.h b/src/serialize.h index 1ad8ac43735..e53ff9fa4c9 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -131,7 +131,6 @@ enum // primary actions SER_NETWORK = (1 << 0), SER_DISK = (1 << 1), - SER_GETHASH = (1 << 2), }; /** diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index ec7b017720f..3722c1ae1fb 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -123,20 +123,14 @@ public: template 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 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;