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") // ErrParentsNotGiven is returned when no block parents and no refreshTipsFunc were given. ErrParentsNotGiven = errors.New("no parents given") )
Functions ¶
func DoPoW ¶
func DoPoW(ctx context.Context, block *iotago.Block, deSeriMode serializer.DeSerializationMode, protoParams *iotago.ProtocolParameters, 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.