Open shuijian-xu opened 4 years ago
The bits field is actually two different numbers. The first is the exponent, which is the last byte. The second is the coefficient, which is the other three bytes in little-endian. The formula for calculating the target from these two numbers is:
target = coefficient × 256^(exponent–3)
Bits is a field that encodes the proof-of-work necessary in this block. This will be discussed more in the next section.