(Copied over from the main thread for reference.)
How to find the account that will forge the next block.
1. Do
http://localhost:7874/nxt?requestType=getState to get value of "lastBlock"
2. Do
http://localhost:7874/nxt?requestType=getBlock&block=10621696942372068326 (assuming 10621696942372068326 is the value of "lastBlock")
3. Convert "generationSignature" into binary and append public key bytes returned by getAccountPublicKey
4. Calculate SHA256(generationSignature, publicKey)
5. First 8 bytes as unsigned long in little-endian notation is HIT
6. Value of "baseTarget" multiplied by effective balance of the account is STATIC_TARGET
7. Do steps 3-6 for each account and find the one with lowest HIT/STATIC_TARGET ratio, this account will forge next block
We have a new block about every two minutes, so to always show the account that forges the next block, I need to do this calculation over all accounts again and again? Plus, I need always up-to-date effective balances.
I could implement this and it would currently run, but it will simply not scale with further adoption of NXT.
For now, I'll not implement this. (And I don't see a huge benefit in showing the account forgiung the next block anyway.)