mining

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0, MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockTemplate

type BlockTemplate struct {
	Miner            address.Address
	Parents          types.TipSetKey
	Ticket           types.Ticket
	Eproof           *types.ElectionProof
	BeaconValues     []*types.BeaconEntry
	Messages         []*types.SignedMessage
	Epoch            abi.ChainEpoch
	Timestamp        uint64
	WinningPoStProof []proof2.PoStProof
}

type MiningAPI

type MiningAPI struct {
	Ming *MiningModule
}

func (*MiningAPI) MinerCreateBlock

func (miningAPI *MiningAPI) MinerCreateBlock(ctx context.Context, bt *BlockTemplate) (*types.BlockMsg, error)

func (*MiningAPI) MinerGetBaseInfo

func (miningAPI *MiningAPI) MinerGetBaseInfo(ctx context.Context, maddr address.Address, round abi.ChainEpoch, tsk types.TipSetKey) (*MiningBaseInfo, error)

type MiningBaseInfo added in v0.9.1

type MiningBaseInfo struct {
	MinerPower        abi.StoragePower
	NetworkPower      abi.StoragePower
	Sectors           []builtin.SectorInfo
	WorkerKey         address.Address
	SectorSize        abi.SectorSize
	PrevBeaconEntry   types.BeaconEntry
	BeaconEntries     []types.BeaconEntry
	EligibleForMining bool
}

type MiningModule

type MiningModule struct {
	Config        miningConfig
	ChainModule   *chain2.ChainSubmodule
	BlockStore    *blockstore.BlockstoreSubmodule
	NetworkModule *network.NetworkSubmodule
	SyncModule    *syncer.SyncerSubmodule
	Wallet        wallet.WalletSubmodule
	// contains filtered or unexported fields
}

func NewMiningModule

func NewMiningModule(
	conf miningConfig,
	chainModule *chain2.ChainSubmodule,
	blockStore *blockstore.BlockstoreSubmodule,
	networkModule *network.NetworkSubmodule,
	syncModule *syncer.SyncerSubmodule,
	wallet wallet.WalletSubmodule,
	proofVerifier ffiwrapper.Verifier,
) *MiningModule

func (*MiningModule) API

func (miningModule *MiningModule) API() *MiningAPI

Jump to

Keyboard shortcuts

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