Documentation ¶
Index ¶
- Constants
- type InclusionCheckNodeApi
- type InclusionCheckTask
- func (i *InclusionCheckTask) Adder(taskFunc harmonytask.AddTaskFunc)
- func (i *InclusionCheckTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
- func (i *InclusionCheckTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
- func (i *InclusionCheckTask) TypeDetails() harmonytask.TaskTypeDetails
- type MiningBase
- type WinPostAPI
- type WinPostTask
- func (t *WinPostTask) Adder(taskFunc harmonytask.AddTaskFunc)
- func (t *WinPostTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
- func (t *WinPostTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
- func (t *WinPostTask) GetSpid(db *harmonydb.DB, taskID int64) string
- func (t *WinPostTask) TypeDetails() harmonytask.TaskTypeDetails
Constants ¶
View Source
const InclusionCheckInterval = 5 * time.Minute
View Source
const MinInclusionEpochs = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InclusionCheckNodeApi ¶
type InclusionCheckTask ¶
type InclusionCheckTask struct {
// contains filtered or unexported fields
}
func NewInclusionCheckTask ¶
func NewInclusionCheckTask(db *harmonydb.DB, api InclusionCheckNodeApi) *InclusionCheckTask
func (*InclusionCheckTask) Adder ¶
func (i *InclusionCheckTask) Adder(taskFunc harmonytask.AddTaskFunc)
func (*InclusionCheckTask) CanAccept ¶
func (i *InclusionCheckTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
func (*InclusionCheckTask) Do ¶
func (i *InclusionCheckTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
func (*InclusionCheckTask) TypeDetails ¶
func (i *InclusionCheckTask) TypeDetails() harmonytask.TaskTypeDetails
type MiningBase ¶
MiningBase is the tipset on top of which we plan to construct our next block. Refer to godocs on GetBestMiningCandidate.
type WinPostAPI ¶
type WinPostAPI interface { ChainHead(context.Context) (*types.TipSet, error) ChainTipSetWeight(context.Context, types.TipSetKey) (types.BigInt, error) ChainGetTipSet(context.Context, types.TipSetKey) (*types.TipSet, error) StateGetBeaconEntry(context.Context, abi.ChainEpoch) (*types.BeaconEntry, error) SyncSubmitBlock(context.Context, *types.BlockMsg) error StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) StateNetworkVersion(context.Context, types.TipSetKey) (network.Version, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) MinerGetBaseInfo(context.Context, address.Address, abi.ChainEpoch, types.TipSetKey) (*api.MiningBaseInfo, error) MinerCreateBlock(context.Context, *api.BlockTemplate) (*types.BlockMsg, error) MpoolSelect(context.Context, types.TipSetKey, float64) ([]*types.SignedMessage, error) WalletSign(context.Context, address.Address, []byte) (*crypto.Signature, error) }
type WinPostTask ¶
type WinPostTask struct {
// contains filtered or unexported fields
}
func NewWinPostTask ¶
func NewWinPostTask(max int, db *harmonydb.DB, remote *paths.Remote, verifier storiface.Verifier, paramck func() (bool, error), api WinPostAPI, actors map[dtypes.MinerAddress]bool) *WinPostTask
func (*WinPostTask) Adder ¶
func (t *WinPostTask) Adder(taskFunc harmonytask.AddTaskFunc)
func (*WinPostTask) CanAccept ¶
func (t *WinPostTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
func (*WinPostTask) Do ¶
func (t *WinPostTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
func (*WinPostTask) GetSpid ¶ added in v1.22.1
func (t *WinPostTask) GetSpid(db *harmonydb.DB, taskID int64) string
func (*WinPostTask) TypeDetails ¶
func (t *WinPostTask) TypeDetails() harmonytask.TaskTypeDetails
Click to show internal directories.
Click to hide internal directories.