I am creating a cryptocurrency contract, which rewards the miner a proof of work generated. To get the reward you will need to call
proofOfWork(uint nonce). If the nonce is correct, the miner is awarded.
I am calling this function at the end of each function, and planning to generate a random nonce which is passed as an argument for the function call. If the nonce is correct transaction is carried out and miner awarded. Else the execution is thrown.
How do I generate this random nonce? And is it the way you carry out proof of work? If not then, how do I use this function?
I am following the guide https://www.ethereum.org/token#proof-of-work .