miner

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2021 License: Apache-2.0, MIT Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//LoopWaitingSeconds data check loop waiting seconds
	LoopWaitingSeconds = time.Second * 30
	// RetrieveParallelNum num
	RetrieveParallelNum = 16
	// DealParallelNum deal thread parallel num
	DealParallelNum = 16
	// RetrieveTryCountMax retrieve try count max
	RetrieveTryCountMax = 50

	// MinerDefaultScore default score
	MinerDefaultScore = 8

	// MinerMaxScore max score
	MinerMaxScore = 10

	// MinerPunishmentScore
	MinerPunishmentScore = 2
)

Functions

func NewTestMiner

func NewTestMiner(nextCh <-chan MineReq, addr address.Address) func(api.FullNode, gen.WinningPoStProver) *Miner

Types

type DataRef

type DataRef struct {
	// contains filtered or unexported fields
}

type MineReq

type MineReq struct {
	InjectNulls abi.ChainEpoch
	Done        func(bool, abi.ChainEpoch, error)
}

type Miner

type Miner struct {
	// contains filtered or unexported fields
}

func NewMiner

func NewMiner(api api.FullNode, epp gen.WinningPoStProver, addr address.Address, sf *slashfilter.SlashFilter, j journal.Journal) *Miner

func (*Miner) Address

func (m *Miner) Address() address.Address

func (*Miner) GetBestMiningCandidate

func (m *Miner) GetBestMiningCandidate(ctx context.Context) (*MiningBase, error)

func (*Miner) Start

func (m *Miner) Start(ctx context.Context) error

func (*Miner) Stop

func (m *Miner) Stop(ctx context.Context) error

type MinerData

type MinerData struct {
	// contains filtered or unexported fields
}

func (*MinerData) Start

func (m *MinerData) Start(ctx context.Context) error

func (*MinerData) Stop

func (m *MinerData) Stop(ctx context.Context) error

type MiningBase

type MiningBase struct {
	TipSet     *types.TipSet
	NullRounds abi.ChainEpoch
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL