miner

package
v0.0.0-...-4f0ab6e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

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

Processor is used to manage the miner node.

func NewProcessor

func NewProcessor(blockChain iblockchain.BlockChain, params *consensus.Params, shardIndex shard.Index, selector iconsensus.Sortitionor, dPool idepositpool.DepositPool, pubSubMgr *message.PubSubManager) *Processor

func (*Processor) Init

func (p *Processor) Init()

Init the miner node processor.

func (*Processor) PreStartABCI

func (p *Processor) PreStartABCI()

func (*Processor) ReceiveSyncHeader

func (p *Processor) ReceiveSyncHeader(header *wire.BlockHeader)

ReceiveSyncHeader receives the block head and use abci to handle it.

func (*Processor) RegisterCEListener

func (p *Processor) RegisterCEListener(listener iconsensus.CEShardStateListener)

RegisterCEListener adds a listener to shardStateListeners.

func (*Processor) SetStartConsensusAtRound

func (p *Processor) SetStartConsensusAtRound(round int)

SetStartConsensusAtRound means set the consensus start at the round.

func (*Processor) Start

func (p *Processor) Start(isIntegrationTest bool)

Start integration test mode.

func (*Processor) StartABCI

func (p *Processor) StartABCI(prevReshardheader *wire.BlockHeader)

StartABCI starts abci and records the preReshardHeader.

func (*Processor) StopABCI

func (p *Processor) StopABCI()

StopABCI stop to handleAbciMsg and fetch tx, change the stoping state of abci to true.

func (*Processor) StopConsensusAtRound

func (p *Processor) StopConsensusAtRound(round int)

StopConsensusAtRound means stop the consensus at the round.

func (*Processor) String

func (p *Processor) String() string

String returns the processor's id information as string.

func (*Processor) UpdateMinerProof

func (p *Processor) UpdateMinerProof(proof []byte)

UpdateMinerProof is used to update miner's proof.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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