Documentation ¶
Index ¶
- func ConsensusHandle(ctx *p2p.Context, consensus *msgTypes.Consensus)
- func DataReqHandle(ctx *p2p.Context, dataReq *msgTypes.DataReq)
- func GetHeadersFromHash(startHash common.Uint256, stopHash common.Uint256) ([]*types.RawHeader, error)
- func HeadersReqHandle(ctx *p2p.Context, headersReq *msgTypes.HeadersReq)
- func InvHandle(ctx *p2p.Context, inv *msgTypes.Inv)
- func TransactionHandle(ctx *p2p.Context, trn *msgTypes.Trn)
- type MsgHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsensusHandle ¶
ConsensusHandle handles the consensus message from peer
func DataReqHandle ¶
DataReqHandle handles the data req(block/Transaction) from peer
func GetHeadersFromHash ¶
func GetHeadersFromHash(startHash common.Uint256, stopHash common.Uint256) ([]*types.RawHeader, error)
get blk hdrs from starthash to stophash
func HeadersReqHandle ¶
func HeadersReqHandle(ctx *p2p.Context, headersReq *msgTypes.HeadersReq)
HeaderReqHandle handles the header sync req from peer
Types ¶
type MsgHandler ¶
type MsgHandler struct {
// contains filtered or unexported fields
}
func NewMsgHandler ¶
func NewMsgHandler(ld *ledger.Ledger) *MsgHandler
func (*MsgHandler) HandlePeerMessage ¶
func (self *MsgHandler) HandlePeerMessage(ctx *p2p.Context, msg msgTypes.Message)
func (*MsgHandler) HandleSystemMessage ¶
func (self *MsgHandler) HandleSystemMessage(net p2p.P2P, msg p2p.SystemMessage)
func (*MsgHandler) ReconnectService ¶
func (mh *MsgHandler) ReconnectService() *reconnect.ReconnectService
Directories ¶
Path | Synopsis |
---|---|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. |
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. |
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. |
Click to show internal directories.
Click to hide internal directories.