Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDir = defaultDir()
View Source
var Instance = New()
Functions ¶
func GetSeedHash ¶
Types ¶
type Ethash ¶
Ethash combines block verification with Light and nonce searching with Full into a single proof of work.
func NewForTesting ¶
NewForTesting creates a proof of work for use in unit tests. It uses a smaller DAG and cache size to keep test times low. DAG files are stored in a temporary directory.
Nonces found by a testing instance are not verifiable with a regular-size cache.
type Full ¶
type Full struct { Dir string // use this to specify a non-default DAG directory // contains filtered or unexported fields }
Full implements the Search half of the proof of work.
func (*Full) GetHashrate ¶
type Light ¶
type Light struct { NumCaches int // Maximum number of caches to keep before eviction (only init, don't modify) // contains filtered or unexported fields }
Light implements the Verify half of the proof of work. It uses a few small in-memory caches to verify the nonces found by Full.
func (*Light) GetVerificationIndices ¶
func (*Light) SolutionState ¶
Click to show internal directories.
Click to hide internal directories.