Metoda RPC getHealth

Zwraca aktualny stan zdrowia węzła. Zdrowy węzeł to taki, który znajduje się w HEALTH_CHECK_SLOT_DISTANCE slotach od najnowszego potwierdzonego slotu klastra.

$ curl https://api.devnet.solana.com -s -X \
> POST -H "Content-Type: application/json" -d '
> {
> "jsonrpc": "2.0",
> "id": 1,
> "method": "getHealth"
> }
> '

params

None

result

Zdrowy
Niezdrowy
Response
{
"jsonrpc": "2.0",
"result": "ok",
"id": 1
}
string

Jeśli węzeł jest zdrowy: "ok"

Is this page helpful?