Skip to content

Commit

Permalink
Merge #544: Use internal endian conversion functions
Browse files Browse the repository at this point in the history
4447572 Namecoin: use internal endian conversion functions (Jeremy Rand)
8e3e46c Namecoin: delete superfluous whitespace (Jeremy Rand)

Pull request description:

  Upstream Bitcoin Core refactored their endian conversion in 86b7f28; make Namecoin follow suit.

  Fixes a Guix build fail for Windows/x86_64 target.

Top commit has no ACKs.

Tree-SHA512: 6761b4b0fc900684193de5d4a506f5dfdf6cc20931ca37d4831265cb660fa06c72e58ef5e65e81a4b8ab23cfb94f2ddeb16893945b6374d856e06fd1faec3b46
  • Loading branch information
domob1812 committed Aug 17, 2024
2 parents eebb7ab + 4447572 commit ec6926c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/names/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class CNameCache
Serialize (Stream& s) const
{
/* Flip the byte order of nHeight to big endian. */
const uint32_t nHeightFlipped = htobe32 (nHeight);
const uint32_t nHeightFlipped = htobe32_internal (nHeight);

::Serialize (s, nHeightFlipped);
::Serialize (s, name);
Expand All @@ -297,7 +297,7 @@ class CNameCache
::Unserialize (s, name);

/* Unflip the byte order. */
nHeight = be32toh (nHeightFlipped);
nHeight = be32toh_internal (nHeightFlipped);
}

friend inline bool
Expand Down Expand Up @@ -383,7 +383,7 @@ class CNameCache
inline bool
isDeleted (const valtype& name) const
{
return (deleted.count (name) > 0);
return (deleted.count (name) > 0);
}

/* Try to get a name's associated data. This looks only
Expand Down

0 comments on commit ec6926c

Please sign in to comment.