Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrOperationAborted is returned when the operation was aborted e.g. by a shutdown signal. ErrOperationAborted = errors.New("operation was aborted") )
Functions ¶
func DoPoW ¶
func DoPoW(ctx context.Context, block *iotago.Block, targetScore float64, parallelism int, refreshTipsInterval time.Duration, refreshTipsFunc RefreshTipsFunc) (blockSize int, err error)
DoPoW does the proof-of-work required to hit the given target score. The given iota.Block's nonce is automatically updated.
Types ¶
type RefreshTipsFunc ¶
RefreshTipsFunc refreshes tips of the block if PoW takes longer than a configured duration.
Click to show internal directories.
Click to hide internal directories.