Documentation
¶
Index ¶
- func GatherAndSend(nodeID int, pl *log.Logger)
- func MergeAndBroadcast(t MessageType, data []byte, from string, to []string, logger *log.Logger)
- func MergeAndSend(t MessageType, content []byte, addr string, logger *log.Logger)
- func MergeMessage(msgType MessageType, content []byte) []byte
- func PrintBlockChain(bc *chain.BlockChain) string
- type BlockInfoMsg
- type BookingMsg
- type Commit
- type ConsensusNode
- type InjectTxs
- type KeepAliveMsg
- type MessageType
- type Node
- type PbftImplInterface
- type PbftImplSimpleImpl
- type PrePrepare
- type Prepare
- type RawMessage
- type Reply
- type Request
- type RequestOldMessage
- type RequestType
- type SeqIDinfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GatherAndSend ¶
func MergeAndBroadcast ¶
func MergeAndSend ¶
func MergeAndSend(t MessageType, content []byte, addr string, logger *log.Logger)
func MergeMessage ¶
func MergeMessage(msgType MessageType, content []byte) []byte
func PrintBlockChain ¶
func PrintBlockChain(bc *chain.BlockChain) string
Types ¶
type BlockInfoMsg ¶
type BookingMsg ¶
type ConsensusNode ¶
type ConsensusNode struct { RunningNode *Node NodeID uint64 CurChain *chain.BlockChain // contains filtered or unexported fields }
func NewPbftNode ¶
func NewPbftNode(nodeID uint64, pcc *chain.Config) *ConsensusNode
func (*ConsensusNode) Run ¶
func (self *ConsensusNode) Run()
type InjectTxs ¶
type InjectTxs struct {
Txs []*base.Transaction
}
type KeepAliveMsg ¶
type KeepAliveMsg struct {
Msg string `json:"msg"`
}
type MessageType ¶
type MessageType string
const ( CPrePrepare MessageType = "preprepare" CPrepare MessageType = "prepare" CCommit MessageType = "commit" CRequestOldrequest MessageType = "requestOldrequest" CStop MessageType = "stop" CPbft MessageType = "pbft" CInject MessageType = "inject" CBlockInfo MessageType = "BlockInfo" CSeqIDinfo MessageType = "SequenceID" CBooking MessageType = "Booking" CKeepAlive MessageType = "KeepAlive" )
func SplitMessage ¶
func SplitMessage(message []byte) (MessageType, []byte)
type PbftImplInterface ¶
type PbftImplInterface interface {
// contains filtered or unexported methods
}
type PbftImplSimpleImpl ¶
type PbftImplSimpleImpl struct {
// contains filtered or unexported fields
}
type PrePrepare ¶
type RawMessage ¶
type RawMessage struct {
Content []byte
}
type Request ¶
type Request struct { RequestType RequestType Msg RawMessage ReqTime time.Time }
type RequestOldMessage ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.