Skip to content

Commit

Permalink
Drop SER_GETHASH
Browse files Browse the repository at this point in the history
Since SER_GETHASH was only ever set in CHashWriter, checking for its
presence will now always fail. Remove those checks, and remove the
constant.
  • Loading branch information
ajtowns committed Sep 26, 2023
1 parent 66ea0d6 commit 81954aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ enum
// primary actions
SER_NETWORK = (1 << 0),
SER_DISK = (1 << 1),
SER_GETHASH = (1 << 2),
};

/**
Expand Down
8 changes: 2 additions & 6 deletions src/wallet/scriptpubkeyman.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,15 @@ 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;
}

template<typename Stream>
void Unserialize(Stream& s)
{
int nVersion = s.GetVersion();
if (!(s.GetType() & SER_GETHASH)) {
s >> nVersion;
}
s >> nVersion;
s >> nTime >> vchPubKey;
try {
s >> fInternal;
Expand Down

0 comments on commit 81954aa

Please sign in to comment.