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.
Click to show internal directories.
Click to hide internal directories.