From 81954aad880f508dadbbabdfddc6803bab2df3d3 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 7 Sep 2023 20:27:26 +1000 Subject: [PATCH] Drop SER_GETHASH Since SER_GETHASH was only ever set in CHashWriter, checking for its presence will now always fail. Remove those checks, and remove the constant. --- src/serialize.h | 1 - src/wallet/scriptpubkeyman.h | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/serialize.h b/src/serialize.h index 1ad8ac4373500f..e53ff9fa4c98ce 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 9d5ce6e12539a0..ed98bb0c544a3e 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -124,9 +124,7 @@ class CKeyPool void Serialize(Stream& s) const { int nVersion = s.GetVersion(); - if (!(s.GetType() & SER_GETHASH)) { - s << nVersion; - } + s << nVersion; s << nTime << vchPubKey << fInternal << m_pre_split; } @@ -134,9 +132,7 @@ class CKeyPool void Unserialize(Stream& s) { int nVersion = s.GetVersion(); - if (!(s.GetType() & SER_GETHASH)) { - s >> nVersion; - } + s >> nVersion; s >> nTime >> vchPubKey; try { s >> fInternal;