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 RegisterProposeOfflineVote(subnet *subnet.SubNet)
- type MsgHandler
- func (self *MsgHandler) GetMaskAddrFilter() p2p.AddressFilter
- func (self *MsgHandler) GetReservedAddrFilter(staticFilterEnabled bool) p2p.AddressFilter
- func (self *MsgHandler) GetSubnetMembersInfo() []msgCommon.SubnetMemberInfo
- func (self *MsgHandler) HandlePeerMessage(ctx *p2p.Context, msg msgTypes.Message)
- func (self *MsgHandler) HandleSystemMessage(net p2p.P2P, msg p2p.SystemMessage)
- func (mh *MsgHandler) ReconnectService() *reconnect.ReconnectService
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
func InvHandle ¶
InvHandle handles the inventory message(block, transaction and consensus) from peer.
func RegisterProposeOfflineVote ¶ added in v1.14.1
Types ¶
type MsgHandler ¶
type MsgHandler struct {
// contains filtered or unexported fields
}
func NewMsgHandler ¶
func NewMsgHandler(acct *account.Account, staticReserveFilter p2p.AddressFilter, ld *ledger.Ledger, txPool common2.TxPoolService, logger msgCommon.Logger) *MsgHandler
func (*MsgHandler) GetMaskAddrFilter ¶ added in v1.11.0
func (self *MsgHandler) GetMaskAddrFilter() p2p.AddressFilter
func (*MsgHandler) GetReservedAddrFilter ¶ added in v1.11.0
func (self *MsgHandler) GetReservedAddrFilter(staticFilterEnabled bool) p2p.AddressFilter
func (*MsgHandler) GetSubnetMembersInfo ¶ added in v1.11.0
func (self *MsgHandler) GetSubnetMembersInfo() []msgCommon.SubnetMemberInfo
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.