Documentation ¶ Index ¶ func GetHashNonce(data []byte, nonce uint32) []byte func StartMine(message []byte, complexity int, threads int) chan uint32 type Mine func NewMine(obj Miner) *Mine func (m *Mine) Running() bool func (m *Mine) Start(threads int) *sync.WaitGroup func (m *Mine) Stop() type Miner Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetHashNonce ¶ func GetHashNonce(data []byte, nonce uint32) []byte GetHashNonce takes a set of bytes and nonce, combines them and issues a joint hash. func StartMine ¶ func StartMine(message []byte, complexity int, threads int) chan uint32 StartMine is the basic mining function for selecting the nonce field. Pass here an array of bytes, the complexity and number of gorutines. In response you will receive a chan that will return a nonce suitable in the future. Types ¶ type Mine ¶ type Mine struct { // contains filtered or unexported fields } func NewMine ¶ func NewMine(obj Miner) *Mine func (*Mine) Running ¶ func (m *Mine) Running() bool func (*Mine) Start ¶ func (m *Mine) Start(threads int) *sync.WaitGroup func (*Mine) Stop ¶ func (m *Mine) Stop() type Miner ¶ type Miner interface { interfaces.Byter GetTimestamp() *int64 GetNonce() *uint32 GetId() *[]byte GetComplexity() int } Source Files ¶ View all Source files mine.go miner.go Click to show internal directories. Click to hide internal directories.