Documentation ¶
Index ¶
- func DiffToTarget(diff float64, powLimit *big.Int) (*big.Int, error)
- func FormatHashRate(hashesPerSec float64) string
- func RevHash(hash string) string
- func Reverse(src []byte) []byte
- func ReverseToInt(s string) (int32, error)
- func RolloverExtraNonce(v *uint32)
- func Uint32EndiannessSwap(v uint32) uint32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffToTarget ¶
DiffToTarget converts a whole number difficulty into a target.
func FormatHashRate ¶
FormatHashRate sets the units properly when displaying a hashrate.
func ReverseToInt ¶
ReverseToInt reverse a string and converts to int32.
func RolloverExtraNonce ¶
func RolloverExtraNonce(v *uint32)
RolloverExtraNonce rolls over the extraNonce if it goes over 0x00FFFFFF many hashes, since the first byte is reserved for the ID.
func Uint32EndiannessSwap ¶
Uint32EndiannessSwap swaps the endianness of a uint32.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.