MCPcopy Create free account
hub / github.com/33cn/chain33 / NetProtocols

Method NetProtocols

client/queueprotocol.go:327–337  ·  view source on GitHub ↗

NetProtocols protocols list

(req *types.ReqNil)

Source from the content-addressed store, hash-verified

325
326//NetProtocols protocols list
327func (q *QueueProtocol) NetProtocols(req *types.ReqNil) (*types.NetProtocolInfos, error) {
328 msg, err := q.send(p2pKey, types.EventNetProtocols, req)
329 if err != nil {
330 log.Error("PeerInfo", "Error", err.Error())
331 return nil, err
332 }
333 if reply, ok := msg.GetData().(*types.NetProtocolInfos); ok {
334 return reply, nil
335 }
336 return nil, types.ErrTypeAsset
337}
338
339// GetHeaders get block headers by height
340func (q *QueueProtocol) GetHeaders(param *types.ReqBlocks) (*types.Headers, error) {

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
ErrorMethod · 0.65
GetDataMethod · 0.65

Tested by

no test coverage detected