pow

package
v0.67.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTransactionsPerBlockLimitReached = errors.New("cannot generate proof-of-work - transaction per block limit reached")
	ErrBlockHeightTooHistoric           = errors.New("cannot generate proof-of-work - block data is too historic")
)

Functions

This section is empty.

Types

type ProofOfWork

type ProofOfWork struct {
	// contains filtered or unexported fields
}

func NewProofOfWork

func NewProofOfWork() *ProofOfWork

func (*ProofOfWork) Generate

func (p *ProofOfWork) Generate(pubKey string, lastBlock *nodetypes.LastBlock) (*commandspb.ProofOfWork, error)

Generate returns a proof-of-work with difficult that respects the history of transactions sent in against a particular block.

Jump to

Keyboard shortcuts

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