getPeers
返回已连接的p2p节点信息
参数
groupID
:unsigned int
- 群组ID
返回值
array
- 已连接的p2p节点信息,字段如下:IPAndPort
:string
- 节点连接的ip和端口nodeId
:string
- 节点的IDTopic
:array
- 节点关注的topic信息
- 示例
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getPeers","params":[1],"id":1}' http://127.0.0.1:8545 |jq
// Result
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"IPAndPort": "127.0.0.1:30308",
"nodeId": "0701cc9f05716690437b78db5b7c9c97c4f8f6dd05794ba4648b42b9267ae07cfcd589447ac36c491e7604242149601d67c415504a838524939ef2230d36ffb8",
"Topic": [ ]
},
{
"IPAndPort": "127.0.0.1:58348",
"nodeId": "353ab5990997956f21b75ff5d2f11ab2c6971391c73585963e96fe2769891c4bc5d8b7c3d0d04f50ad6e04c4445c09e09c38139b1c0a5937a5778998732e34da",
"Topic": [ ]
},
{
"IPAndPort": "127.0.0.1:30300",
"nodeId": "73aebaea2baa9640df416d0e879d6e0a6859a221dad7c2d34d345d5dc1fe9c4cda0ab79a7a3f921dfc9bdea4a49bb37bdb0910c338dadab2d8b8e001186d33bd",
"Topic": [ ]
}
]
}
当前内容版权归 fisco-bcos.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 fisco-bcos.org .