Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidParameters = errors.New("invalid parameters")
Functions ¶
This section is empty.
Types ¶
type Data ¶ added in v1.4.0
type Data interface { blockchain.Data }
Data ...
It's used only for mock generating.
type ProofOfWork ¶
type ProofOfWork struct { TargetBit int MaxAttemptCount mo.Option[int] RandomInitialNonceParams mo.Option[powValueTypes.RandomNonceParams] }
ProofOfWork ...
func (ProofOfWork) Difficulty ¶ added in v1.4.0
func (proofer ProofOfWork) Difficulty(hash string) (int, error)
Difficulty ...
func (ProofOfWork) Hash
deprecated
func (proofer ProofOfWork) Hash(block blockchain.Block) string
Hash ...
Deprecated: Use ProofOfWork.HashEx instead.
func (ProofOfWork) HashEx ¶ added in v1.4.1
func (proofer ProofOfWork) HashEx( ctx context.Context, block blockchain.Block, ) (string, error)
HashEx ...
func (ProofOfWork) Validate ¶
func (proofer ProofOfWork) Validate(block blockchain.Block) error
Validate ...
Click to show internal directories.
Click to hide internal directories.