Documentation
¶
Index ¶
Constants ¶
View Source
const ( Ping = iota + 1 AskPeers MineMicro PersistComplete SnapshotTimeout )
Variables ¶
This section is empty.
Functions ¶
func SendAsyncTask ¶
SendAsyncTask sends task into channel with overflow check.
Types ¶
type AskPeersTask ¶
type AskPeersTask struct {
// contains filtered or unexported fields
}
func NewAskPeersTask ¶
func NewAskPeersTask(d time.Duration) AskPeersTask
func (AskPeersTask) Run ¶
func (a AskPeersTask) Run(ctx context.Context, output chan AsyncTask) error
func (AskPeersTask) Type ¶
func (a AskPeersTask) Type() int
type MineMicroTask ¶
type MineMicroTask struct {
MineMicroTaskData MineMicroTaskData
// contains filtered or unexported fields
}
func NewMineMicroTask ¶
func NewMineMicroTask(timeout time.Duration, block *proto.Block, limits proto.MiningLimits, keyPair proto.KeyPair, vrf []byte) MineMicroTask
func (MineMicroTask) Run ¶
func (a MineMicroTask) Run(ctx context.Context, output chan AsyncTask) error
func (MineMicroTask) Type ¶
func (MineMicroTask) Type() int
type MineMicroTaskData ¶
type SnapshotTimeoutTask ¶
type SnapshotTimeoutTask struct {
SnapshotTimeoutTaskData SnapshotTimeoutTaskData
// contains filtered or unexported fields
}
func NewBlockSnapshotTimeoutTask ¶
func NewBlockSnapshotTimeoutTask( timeout time.Duration, blockID proto.BlockID, outdated <-chan struct{}, ) SnapshotTimeoutTask
func NewMicroBlockSnapshotTimeoutTask ¶
func NewMicroBlockSnapshotTimeoutTask( timeout time.Duration, blockID proto.BlockID, outdated <-chan struct{}, ) SnapshotTimeoutTask
func (SnapshotTimeoutTask) Run ¶
func (a SnapshotTimeoutTask) Run(ctx context.Context, output chan AsyncTask) error
func (SnapshotTimeoutTask) Type ¶
func (SnapshotTimeoutTask) Type() int
type SnapshotTimeoutTaskData ¶
type SnapshotTimeoutTaskData struct {
BlockID proto.BlockID
SnapshotTaskType SnapshotTimeoutTaskType
}
type SnapshotTimeoutTaskType ¶
type SnapshotTimeoutTaskType int
const ( BlockSnapshot SnapshotTimeoutTaskType = iota + 1 MicroBlockSnapshot )
Click to show internal directories.
Click to hide internal directories.