NetProtocols protocols list
(req *types.ReqNil)
| 325 | |
| 326 | //NetProtocols protocols list |
| 327 | func (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 |
| 340 | func (q *QueueProtocol) GetHeaders(param *types.ReqBlocks) (*types.Headers, error) { |