Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigToCompact ¶
BigToCompact converts a whole number N to a compact representation using an unsigned 64-bit number
func CalcNextRequiredDifficulty ¶
func CalcNextRequiredDifficulty(lastBH, compareBH *legacy.BlockHeader) uint64
CalcNextRequiredDifficulty return the difficult for next block
func CheckProofOfWork ¶
CheckProofOfWork the hash is vaild for given difficult
func CompactToBig ¶
CompactToBig converts a compact representation of a whole number N to an unsigned 64-bit number. The representation is similar to IEEE754 floating point numbers.
------------------------------------------------- | Exponent | Sign | Mantissa | ------------------------------------------------- | 8 bits [63-56] | 1 bit [55] | 55 bits [54-00] | ------------------------------------------------- N = (-1^sign) * mantissa * 256^(exponent-3)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.