Add proper support for eth_hashrate #1019
Labels
bug
Something isn't working
enhancement
New feature or request
P3
Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion)
Milestone
We should properly support
eth_hashrate
, as it currently always returns 0.We need to add eth_submitHashrate that is just a two arg function, a BigInteger first arg (value) and a hash as second arg (key) and we put it in a hashmap. Then for eth_hashrate we sum up the values of the map with the cpu rate.
We may want to size limit the hashmap (where we evict the least recently updated value) and remove zero rates to prevent memory bloat attacks.
The text was updated successfully, but these errors were encountered: