Documentation ¶
Index ¶
- Constants
- type BlockByHeightReqHandler
- type BlockReqHandler
- type Host
- type MsgService
- func (svc *MsgService) BroadcastNewView(qc *core.QuorumCert) error
- func (svc *MsgService) BroadcastProposal(blk *core.Block) error
- func (svc *MsgService) BroadcastTxList(txList *core.TxList) error
- func (svc *MsgService) RequestBlock(pubKey *core.PublicKey, hash []byte) (*core.Block, error)
- func (svc *MsgService) RequestBlockByHeight(pubKey *core.PublicKey, height uint64) (*core.Block, error)
- func (svc *MsgService) RequestTxList(pubKey *core.PublicKey, hashes [][]byte) (*core.TxList, error)
- func (svc *MsgService) SendNewView(pubKey *core.PublicKey, qc *core.QuorumCert) error
- func (svc *MsgService) SendVote(pubKey *core.PublicKey, vote *core.Vote) error
- func (svc *MsgService) SetReqHandler(reqHandler ReqHandler) error
- func (svc *MsgService) SubscribeNewView(buffer int) *emitter.Subscription
- func (svc *MsgService) SubscribeProposal(buffer int) *emitter.Subscription
- func (svc *MsgService) SubscribeTxList(buffer int) *emitter.Subscription
- func (svc *MsgService) SubscribeVote(buffer int) *emitter.Subscription
- type MsgType
- type Peer
- type PeerStatus
- type PeerStore
- type ReqHandler
- type TxListReqHandler
Constants ¶
View Source
const ( // message size limit in bytes (~100 MB) // to avoid out of memory allocation for reading next message MessageSizeLimit uint32 = 100000000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockByHeightReqHandler ¶
func (*BlockByHeightReqHandler) Type ¶
func (hdlr *BlockByHeightReqHandler) Type() p2p_pb.Request_Type
type BlockReqHandler ¶
func (*BlockReqHandler) Type ¶
func (hdlr *BlockReqHandler) Type() p2p_pb.Request_Type
type MsgService ¶
type MsgService struct {
// contains filtered or unexported fields
}
func NewMsgService ¶
func NewMsgService(host *Host) *MsgService
func (*MsgService) BroadcastNewView ¶
func (svc *MsgService) BroadcastNewView(qc *core.QuorumCert) error
func (*MsgService) BroadcastProposal ¶
func (svc *MsgService) BroadcastProposal(blk *core.Block) error
func (*MsgService) BroadcastTxList ¶
func (svc *MsgService) BroadcastTxList(txList *core.TxList) error
func (*MsgService) RequestBlock ¶
func (*MsgService) RequestBlockByHeight ¶
func (*MsgService) RequestTxList ¶
func (*MsgService) SendNewView ¶
func (svc *MsgService) SendNewView(pubKey *core.PublicKey, qc *core.QuorumCert) error
func (*MsgService) SetReqHandler ¶
func (svc *MsgService) SetReqHandler(reqHandler ReqHandler) error
func (*MsgService) SubscribeNewView ¶
func (svc *MsgService) SubscribeNewView(buffer int) *emitter.Subscription
func (*MsgService) SubscribeProposal ¶
func (svc *MsgService) SubscribeProposal(buffer int) *emitter.Subscription
func (*MsgService) SubscribeTxList ¶
func (svc *MsgService) SubscribeTxList(buffer int) *emitter.Subscription
func (*MsgService) SubscribeVote ¶
func (svc *MsgService) SubscribeVote(buffer int) *emitter.Subscription
type MsgType ¶
type MsgType byte
const ( MsgTypeProposal MsgType MsgTypeVote MsgTypeNewView MsgTypeTxList MsgTypeRequest MsgTypeResponse )
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
Peer type
type PeerStatus ¶
type PeerStatus int8
PeerStatus type
const ( PeerStatusDisconnected PeerStatus = iota PeerStatusConnecting PeerStatusConnected PeerStatusBlocked )
PeerStatus
type PeerStore ¶
type PeerStore struct {
// contains filtered or unexported fields
}
func NewPeerStore ¶
func NewPeerStore() *PeerStore
func (*PeerStore) LoadOrStore ¶
type ReqHandler ¶
type TxListReqHandler ¶
func (*TxListReqHandler) Type ¶
func (hdlr *TxListReqHandler) Type() p2p_pb.Request_Type
Click to show internal directories.
Click to hide internal directories.