Documentation ¶
Index ¶
- Variables
- func DecodeValueHex(val string) string
- func DiffFloatToInt(diffFloat float64) (diffInt int64)
- func DiffIntToFloat(diffInt int64) (diffFloat float64)
- func FormatRatReward(reward *big.Rat) string
- func FormatReward(reward *big.Int) string
- func GetTargetHex(diff int64) string
- func IsValidHexAddress(s string) bool
- func IsZeroHash(s string) bool
- func MakeTimestamp() int64
- func MustParseDuration(s string) time.Duration
- func String2Big(num string) *big.Int
- func StringInSlice(a string, list []string) bool
- func StringToBig(h string) *big.Int
- func TargetHexToDiff(targetHex string) *big.Int
- func ToHex(n int64) string
- func ToHex1(n int64) string
Constants ¶
This section is empty.
Variables ¶
View Source
var Diff1 = StringToBig("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")
View Source
var Ether = math.BigPow(10, 18)
View Source
var Shannon = math.BigPow(10, 9)
Functions ¶
func DecodeValueHex ¶
https://github.com/octanolabs/go-spectrum/blob/21ca5a2f3fec6c4bd12d5cc0a93b40cd305036fc/util/util.go
func DiffFloatToInt ¶
func DiffIntToFloat ¶
func FormatRatReward ¶
func FormatReward ¶
func GetTargetHex ¶
func IsValidHexAddress ¶
func IsZeroHash ¶
func MakeTimestamp ¶
func MakeTimestamp() int64
func MustParseDuration ¶
func String2Big ¶
func StringInSlice ¶
func StringToBig ¶
func TargetHexToDiff ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.