consensus

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAckSignValidate

func IsAckSignValidate(va *protos.ConfirmAckBlock) bool

Types

type ActiveTrx

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

func NewActiveTrx

func NewActiveTrx() *ActiveTrx

func (*ActiveTrx) SetDposService

func (act *ActiveTrx) SetDposService(dps *DPoS)

type BlockProcessor

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

func NewBlockProcessor

func NewBlockProcessor() *BlockProcessor

func (*BlockProcessor) SetDpos

func (bp *BlockProcessor) SetDpos(dp *DPoS)

func (*BlockProcessor) Start

func (bp *BlockProcessor) Start()

func (*BlockProcessor) Stop

func (bp *BlockProcessor) Stop()

type BlockReceivedVotes added in v0.0.9

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

type DPoS added in v0.0.9

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

func NewDPoS added in v0.0.9

func NewDPoS(cfg *config.Config, accounts []*types.Account) (*DPoS, error)

func (*DPoS) GetOnlineRepresentatives added in v0.0.9

func (dps *DPoS) GetOnlineRepresentatives() []types.Address

func (*DPoS) Init added in v0.0.9

func (dps *DPoS) Init() error

func (*DPoS) ReceiveConfirmAck added in v0.0.9

func (dps *DPoS) ReceiveConfirmAck(ack *protos.ConfirmAckBlock, hash types.Hash, msgFrom string)

func (*DPoS) ReceiveConfirmReq added in v0.0.9

func (dps *DPoS) ReceiveConfirmReq(blk *types.StateBlock, hash types.Hash, msgFrom string)

func (*DPoS) ReceivePublish added in v0.0.9

func (dps *DPoS) ReceivePublish(blk *types.StateBlock, hash types.Hash, msgFrom string)

func (*DPoS) ReceiveSyncBlock added in v0.0.9

func (dps *DPoS) ReceiveSyncBlock(blk *types.StateBlock)

func (*DPoS) Start added in v0.0.9

func (dps *DPoS) Start() error

func (*DPoS) Stop added in v0.0.9

func (dps *DPoS) Stop() error

type Election

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

func NewElection

func NewElection(dps *DPoS, block *types.StateBlock) (*Election, error)

type Votes

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

func NewVotes

func NewVotes(blk *types.StateBlock) *Votes

Jump to

Keyboard shortcuts

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