hashrate method

Future<int?> hashrate()

Hashrate, returns the number of hashes per second that the node is mining with.

Implementation

Future<int?> hashrate() async {
  const method = EthereumRpcMethods.hashrate;
  final dynamic res = await _client.rpcClient.request(method);
  if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
    return EthereumUtilities.hexToInt(res[EthereumConstants.ethResultKey]);
  }
  _client.processError(method, res);
  return null;
}