## Why do we inverse the hash of the blockheader?

1

Let's pick this example blockheader-hashing in Python:

from hashlib import sha256
import hashlib
// result is 00000000000000000020cf2bdc6563fb25c424af588d5fb7223461e72715e4a9


I know that it's part of the protocol and otherwise, a block will not be accepted, but:

1. Why do we not accept a hash that ends with all those zeros? Is it because it's easier for a program to calculate if hash < expected_hash?
2. But in this case, I don't understand why do we do not simply accept a hash sha256(sha256(header).digest()).digest().encode('hex') that is lower than the expected hash? The probability to get that should be as high as the inversed one.

So what's the reason of inversing it?

1https://en.wikipedia.org/wiki/Endianness – Nate Eldredge – 2018-01-07T16:38:37.560

1. Why do we not accept a hash that ends with all those zeros? Is it because it's easier for a program to calculate if hash < expected_hash?
1. But in this case, I don't understand why do we do not simply accept a hash sha256(sha256(header).digest()).digest().encode('hex') that is lower than the expected hash? The probability to get that should be as high as the inversed one.