Added eth_hashrate. (#503)

Added eth_hashrate
MadelineMurray 6 years ago committed by GitHub
parent e06c685f4e
commit 3136e311bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      docs/Reference/JSON-RPC-API-Methods.md
  2. 1
      docs/Using-Pantheon/Mining.md

@ -374,6 +374,35 @@ None
}
```
### eth_hashrate
Returns the number of hashes per second with which the node is mining.
**Parameters**
None
**Returns**
`result` : `quantity` - Number of hashes per second
!!! example
```bash tab="curl HTTP request"
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":1}' <JSON-RPC-http-endpoint:port>
```
```bash tab="wscat WS request"
{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":1}
```
```json tab="JSON result"
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x12b"
}
```
### eth_gasPrice
Returns the current gas unit price in wei.

@ -15,3 +15,4 @@ JSON-RPC API methods for mining are:
* [`miner_start`](../Reference/JSON-RPC-API-Methods.md#miner_start) to start mining.
* [`miner_stop`](../Reference/JSON-RPC-API-Methods.md#miner_stop) to stop mining.
* [`eth_mining`](../Reference/JSON-RPC-API-Methods.md#eth_mining) to determine whether the client is actively mining new blocks.
* [`eth_hashrate`](../Reference/JSON-RPC-API-Methods.md#eth_hashrate) to get the number of hashes per second with which the node is mining.
Loading…
Cancel
Save