L0vdL0vd

net_listening

Returns true if the node is listening for peer connections.

curl https://eth.l0vdinfra.com/YOUR_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"net_listening","params":[]}'

Пример ответа

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}
Параметры и свой эндпоинт

Параметры

У метода нет параметров.

Возвращает

boolean Listening state.

Когда использовать

Check that the node accepts peer connections; a basic liveness signal.

Как читать ответ

true or false.

Советы

  • For application health checks eth_blockNumber is more useful: it also shows the node is moving.

Связанные методы