work

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimestampWord  = 2
	Nonce1Word     = 4
	GetworkDataLen = (1 + ((wire.MaxBlockHeaderPayload*8 + 65) / (chainhash.HashBlockSize * 8))) * chainhash.HashBlockSize
)

These are the locations of various data inside Work.Data.

Variables

This section is empty.

Functions

This section is empty.

Types

type Work

type Work struct {
	BlockHeader  wire.BlockHeader
	Target       *big.Int
	JobTime      uint32
	TimeReceived uint32
	IsGetWork    bool
	JobID        string
}

Work holds the data returned from getwork and if needed some stratum related values.

func NewWork

func NewWork(blockHeader wire.BlockHeader, target *big.Int, jobTime uint32, timeReceived uint32, isGetWork bool, jobID string) *Work

NewWork is the constructor for Work.

Jump to

Keyboard shortcuts

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