Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestMiner ¶
Types ¶
type MineReq ¶ added in v0.5.0
type MineReq struct { InjectNulls abi.ChainEpoch Done func(bool, abi.ChainEpoch, error) }
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
Miner encapsulates the mining processes of the system.
Refer to the godocs on mineOne and mine methods for more detail.
func NewMiner ¶
func NewMiner(api v1api.FullNode, epp gen.WinningPoStProver, addr address.Address, sf *slashfilter.SlashFilter, j journal.Journal) *Miner
NewMiner instantiates a miner with a concrete WinningPoStProver and a miner address (which can be different from the worker's address).
func (*Miner) Address ¶ added in v0.3.0
func (m *Miner) Address() address.Address
Address returns the address of the miner.
func (*Miner) GetBestMiningCandidate ¶
func (m *Miner) GetBestMiningCandidate(ctx context.Context) (*MiningBase, error)
GetBestMiningCandidate implements the fork choice rule from a miner's perspective, returning the best head to mine on. This includes the number of null rounds we think we should insert and the time at which we received said head.
type MiningBase ¶
MiningBase is the tipset on top of which we plan to construct our next block. Refer to godocs on GetBestMiningCandidate.
Click to show internal directories.
Click to hide internal directories.