BSHA3 / bsha3

The first SHA3d PoW blockchain. Full Node + Wallet + CPU Miner. Experimental.
https://github.com/bsha3/bsha3/releases
MIT License
17 stars 16 forks source link

Add getlocalhashps RPC call to expose local hashrate #17

Closed fafrd closed 5 years ago

fafrd commented 5 years ago

I've added the RPC call 'getlocalhashps', which allows a CPU miner to know their current hashrate. Prints out as an integer, like

./src/bsha3-cli getlocalhashps
1807692

It'll also show in 'getmininginfo':

./src/bsha3-cli getmininginfo
{
  "blocks": 6084,
  "currentblockweight": 4000,
  "currentblocktx": 0,
  "difficulty": 18.73298317075785,
  "localhashps": 1727272,
  "networkhashps": 275870950.3436443,
  "pooledtx": 0,
  "chain": "main",
  "warnings": ""
}

I didn't update the rpc documentation because... I couldn't find any? bitcoin doesn't have an rpc doc page i guess lol It does show when you run 'bsha3-cli help' though

ch4ot1c commented 5 years ago

Looks great - thank you!

ch4ot1c commented 5 years ago

Closes #15