monero-integrations / monerophp

Monero PHP library + JsonRPC Client
MIT License
116 stars 76 forks source link

get_connections method not found #118

Closed dlopez closed 3 years ago

dlopez commented 3 years ago

I have my daemon running and its currently downloading the blockchain. When I can run other commands like getlastblockheader() I get output.

"block_header" => array:20 [▼
    "block_size" => 0
    "cumulative_difficulty" => 0
    "cumulative_difficulty_top64" => 0
    "depth" => 0
    "difficulty" => 0
    "difficulty_top64" => 0
    "hash" => ""
    "height" => 0
    "major_version" => 0
    "miner_tx_hash" => ""
    "minor_version" => 0
    "nonce" => 0
    "num_txes" => 0
    "orphan_status" => false
    "pow_hash" => ""
    "prev_hash" => ""
    "reward" => 0
    "timestamp" => 0
    "wide_cumulative_difficulty" => ""
    "wide_difficulty" => ""
  ]
  "credits" => 0
  "status" => "BUSY"
  "top_hash" => ""
  "untrusted" => false

But when trying to run get_connections I get the following error..

Request have return error: Method not found; Request: {"jsonrpc":"2.0","method":"get_connections","params":null};

serhack commented 3 years ago

As specified in MAP for JSON API (see https://github.com/monero-project/monero/blob/master/src/rpc/core_rpc_server.h#L162 for reference), the method is NOT available when the daemon is set in restricted mode.

dlopez commented 3 years ago

Interesting. Then I guess for the scope of this issue, it can be closed. The only oddity I encountered was when I would start the daemon without restricted on. My docker image wouldn't load properly. But this was before the entire block chain was downloaded. Either way, Thank you.