consensus

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 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 *DposService)

type BlockProcessor

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

func NewBlockProcessor

func NewBlockProcessor() *BlockProcessor

func (*BlockProcessor) SetDpos

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

func (*BlockProcessor) Start

func (bp *BlockProcessor) Start()

func (*BlockProcessor) Stop

func (bp *BlockProcessor) Stop()

type DposService

type DposService struct {
	common.ServiceLifecycle
	// contains filtered or unexported fields
}

func NewDposService

func NewDposService(cfg *config.Config, netService p2p.Service, account types.Address, password string) (*DposService, error)

func (*DposService) GetAccountPrv

func (dps *DposService) GetAccountPrv(account types.Address) (*types.Account, error)

func (*DposService) GetOnlineRepresentatives added in v0.0.2

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

func (*DposService) GetP2PService added in v0.0.2

func (dps *DposService) GetP2PService() p2p.Service

func (*DposService) Init

func (dps *DposService) Init() error

func (*DposService) ReceiveConfirmAck

func (dps *DposService) ReceiveConfirmAck(v interface{})

func (*DposService) ReceiveConfirmReq

func (dps *DposService) ReceiveConfirmReq(v interface{})

func (*DposService) ReceivePublish

func (dps *DposService) ReceivePublish(v interface{})

func (*DposService) ReceiveSyncBlock

func (dps *DposService) ReceiveSyncBlock(v interface{})

func (*DposService) SetWalletStore

func (dps *DposService) SetWalletStore(wallet *wallet.WalletStore)

func (*DposService) Start

func (dps *DposService) Start() error

func (*DposService) Status

func (dps *DposService) Status() int32

func (*DposService) Stop

func (dps *DposService) Stop() error

type Election

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

func NewElection

func NewElection(dps *DposService, block types.Block) (*Election, error)

type Votes

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

func NewVotes

func NewVotes(blk types.Block) *Votes

Jump to

Keyboard shortcuts

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