getHealth RPC 方法
返回节点的当前健康状态。健康的节点是指在最新集群确认 slot 的
HEALTH_CHECK_SLOT_DISTANCE
slot 范围内的节点。
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getHealth"> }> '
params
Noneresult
健康
不健康
Response
{"jsonrpc": "2.0","result": "ok","id": 1}
string
如果节点健康:"ok"
Is this page helpful?