consensus

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchainInfo

type BlockchainInfo struct {
	LastSeqNo uint64
	Height    uint32
}

BlockchainInfo information of block chain

type BroadcastConsensus

type BroadcastConsensus struct {
	To      string
	Payload []byte
}

BroadcastConsensus Define consensus data for broadcast

type CommittedTxs

type CommittedTxs struct {
	Skip         bool
	IsLocalChain bool
	SeqNo        uint64
	Time         uint32
	Transactions []*types.Transaction
}

CommittedTxs Consensus output object

type Consenter

type Consenter interface {
	Start()
	Stop()
	Quorum() int
	RecvConsensus([]byte)
	BroadcastConsensusChannel() <-chan *BroadcastConsensus
	CommittedTxsChannel() <-chan *OutputTxs
}

Consenter Interface for plugin consenser

type IStack

type IStack interface {
	VerifyTxsInConsensus(txs []*types.Transaction, primary bool) bool
	GetBlockchainInfo() *BlockchainInfo
	ITxPool
}

IStack Interface for other function for plugin consenser

type ITxPool

type ITxPool interface {
	FetchGroupingTxsInTxPool(groupingNum, maxSizeInGrouping int) []types.Transactions
}

ITxPool Interface for tx containter, input

type OutputTxs

type OutputTxs struct {
	Outputs []*CommittedTxs
	Height  uint32
}

OutputTxs Consensus output object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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