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

Function ArrayToEhIndex

src/crypto/equihash.cpp:170–176  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

168// Big-endian so that lexicographic array comparison is equivalent to integer
169// comparison
170eh_index ArrayToEhIndex(const unsigned char* array)
171{
172 BOOST_STATIC_ASSERT(sizeof(eh_index) == 4);
173 eh_index bei;
174 memcpy(&bei, array, sizeof(eh_index));
175 return be32toh(bei);
176}
177
178eh_trunc TruncateIndex(const eh_index i, const unsigned int ilen)
179{

Callers 1

GetIndicesFromMinimalFunction · 0.85

Calls 2

memcpyFunction · 0.85
be32tohFunction · 0.85

Tested by

no test coverage detected