util

package
v0.0.0-...-0f4ef4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2018 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExtraNonce

func CheckExtraNonce(v *uint32)

func DiffToTarget

func DiffToTarget(diff float64, powLimit *big.Int) (*big.Int, error)

DiffToTarget converts a whole number difficulty into a target.

func FormatHashRate

func FormatHashRate(h float64) string

FormatHashRate sets the units properly when displaying a hashrate.

func RevHash

func RevHash(hash string) string

RevHash reverses a hash in string format.

func Reverse

func Reverse(src []byte) []byte

Reverse reverses a byte array.

func ReverseToInt

func ReverseToInt(s string) (int32, error)

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

func Uint32EndiannessSwap(v uint32) uint32

Uint32EndiannessSwap swaps the endianness of a uint32.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL