参数
此方法没有参数。
返回值
string Peer count, hex.
适用场景
See how many peers the node is connected to.
如何解读结果
Hex integer: 0x2a = 42 peers.
提示
- Behind a load balancer the value comes from whichever node answered.
Returns the number of peers connected to the node.
curl https://eth.l0vdinfra.com/YOUR_KEY \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"net_peerCount","params":[]}'响应示例
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x40"
}此方法没有参数。
string Peer count, hex.
See how many peers the node is connected to.
Hex integer: 0x2a = 42 peers.