hashid

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCOOP_SIZE = 64
	NUM_SCOOPS = 4096
	NONCE_SIZE = NUM_SCOOPS * SCOOP_SIZE
	HASH_SIZE  = 32
	HASH_CAP   = 4096
)
View Source
const (

	// GenesisBaseTarget is the base target of the first block
	GenesisBaseTarget = 18325193796
	// BlockChainStart is the timestamp of the first Block
	BlockChainStart = 1407722400
)

Variables

This section is empty.

Functions

func CalcuDeadline

func CalcuDeadline(pid *big.Int, nonce *big.Int, baseTarget *big.Int, scn uint64, gensig []byte) int64

func CalcuHit

func CalcuHit(pid, nonce *big.Int, genSig []byte) uint64

func CalcuHitAndScoop

func CalcuHitAndScoop(pid, nonce *big.Int, genSig []byte, scoopNum uint64) uint64

func CalculateGenSinGen

func CalculateGenSinGen(lastSig []byte, Generator *big.Int) []byte

func CalculateGenerFSP

func CalculateGenerFSP(secretPhrase string) (PID *big.Int)

func CalculateGenerationSignature

func CalculateGenerationSignature(lastSig []byte, pub []byte) []byte

func CalculateScoop

func CalculateScoop(genSig []byte, height *big.Int) uint64

func DateToTimestamp

func DateToTimestamp(date time.Time) uint32

DateToTimeStamp yields a timestamp counted since block chain start

func DecodeGeneratorSignature

func DecodeGeneratorSignature(genSigStr string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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