public void DoMining() { // Generate key Key key = Program.GenerateKey(); while (true) { // Make sure we are connected to the network // Create block Block block = CreateBlock(key); } }