mining

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiningAPI

type MiningAPI struct {
	Ming *MiningModule
}

func (*MiningAPI) MinerCreateBlock

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

MinerCreateBlock create block base on template

func (*MiningAPI) MinerGetBaseInfo

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

MinerGetBaseInfo get current miner information

type MiningModule

type MiningModule struct {
	Config        miningConfig
	ChainModule   *chain2.ChainSubmodule
	BlockStore    *blockstore.BlockstoreSubmodule
	NetworkModule *network.NetworkSubmodule
	SyncModule    *syncer.SyncerSubmodule
	Wallet        wallet.WalletSubmodule

	Stmgr *statemanger.Stmgr
	// contains filtered or unexported fields
}

MiningModule enhances the `Node` with miner capabilities.

func NewMiningModule

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

NewMiningModule create new mining module

func (*MiningModule) API

func (miningModule *MiningModule) API() v1api.IMining

API create new miningAPi implement

func (*MiningModule) V0API added in v0.9.7

func (miningModule *MiningModule) V0API() v0api.IMining

Jump to

Keyboard shortcuts

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