miner

package
v0.0.0-...-7bd4979 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Miner

type Miner struct {
	goqryptonight.Qryptominer

	StopMiningChan chan bool
	// contains filtered or unexported fields
}

func CreateMiner

func CreateMiner(chain *chain.Chain, registerAndBroadcastChan chan *messages.RegisterMessage) *Miner

func (*Miner) CreateBlock

func (m *Miner) CreateBlock(minerAddress []byte, parentBlock *block.Block, miningNonce uint32, txPool *pool.TransactionPool) (*block.Block, error)

func (*Miner) GetBlockToMine

func (m *Miner) GetBlockToMine(minerQAddress string, lastBlock *block.Block, lastBlockDifficulty []byte, txPool *pool.TransactionPool) (string, uint64, error)

func (*Miner) HandleEvent

func (m *Miner) HandleEvent(event goqryptonight.MinerEvent) byte

func (*Miner) PrepareNextBlockTemplate

func (m *Miner) PrepareNextBlockTemplate(minerAddress []byte, parentBlock *block.Block, txPool *pool.TransactionPool, enableLocking bool) error

func (*Miner) StartMining

func (m *Miner) StartMining()

func (*Miner) SubmitMinedBlock

func (m *Miner) SubmitMinedBlock(blob []byte) bool

Jump to

Keyboard shortcuts

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