Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles PoW requests of the node and uses local PoW. It refreshes the tips of messages during PoW.
func (*Handler) DoPoW ¶
func (h *Handler) DoPoW(ctx context.Context, msg *iotago.Message, parallelism int, refreshTipsFunc ...RefreshTipsFunc) (messageSize int, err error)
DoPoW does the proof-of-work required to hit the target score configured on this Handler. The given iota.Message's nonce is automatically updated.
type RefreshTipsFunc ¶ added in v1.2.2
type RefreshTipsFunc = func() (tips hornet.MessageIDs, err error)
RefreshTipsFunc refreshes tips of the message if PoW takes longer than a configured duration.
Click to show internal directories.
Click to hide internal directories.