MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / EhIndexToArray

Function EhIndexToArray

src/crypto/equihash.cpp:161–166  ·  view source on GitHub ↗

Big-endian so that lexicographic array comparison is equivalent to integer comparison

Source from the content-addressed store, hash-verified

159// Big-endian so that lexicographic array comparison is equivalent to integer
160// comparison
161void EhIndexToArray(const eh_index i, unsigned char* array)
162{
163 BOOST_STATIC_ASSERT(sizeof(eh_index) == 4);
164 eh_index bei = htobe32(i);
165 memcpy(array, &bei, sizeof(eh_index));
166}
167
168// Big-endian so that lexicographic array comparison is equivalent to integer
169// comparison

Callers 2

GetMinimalFromIndicesFunction · 0.85
FullStepRowMethod · 0.85

Calls 2

htobe32Function · 0.85
memcpyFunction · 0.85

Tested by

no test coverage detected