vdev Knot.Block.Miner

Provides an example of a working miner.

It is not recommended to use it as such, as it is extremely slow compared to anything running at a lower level, eg C code.

Link to this section Summary

Functions

Find a nonce matching the given block’s difficulty

Link to this section Functions

Find a nonce matching the given block’s difficulty.

Examples

iex> b = Knot.Block.Miner.mine %Knot.Block{}
iex> [b.height, b.nonce, Knot.Hash.to_string(b.hash, short: true)]
[0, 224, "00551db3"]