Skip to content

Commit

Permalink
Namecoin: use internal endian conversion functions
Browse files Browse the repository at this point in the history
Upstream Bitcoin Core refactored their endian conversion in
86b7f28; make Namecoin follow suit.

Fixes a Guix build fail for Windows/x86_64 target.
  • Loading branch information
Jeremy Rand committed Aug 13, 2024
1 parent 8e3e46c commit 4447572
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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

0 comments on commit 4447572

Please sign in to comment.