|
November 18, 2018, 11:11:59 PM |
|
The Merkle root is also little-endian...
As to why, it's because the fields are read/written directly between memory and the socket, and that's how the data is ordered in memory. Integers are little-endian in memory because that's how the supported architectures do things. It's a little weird that hashes are stored little-endian, but Satoshi put most hashes in a uint256 type which behaved how you'd expect a 256-bit integer to behave on eg. x86, including little-endianness.
|