public bool Mine(Blockchain bc) { Block b = bc.GetBlock(key.Export(CngKeyBlobFormat.EccPublicBlob)); while (!b.IsDifficultyMatched()) { b.header.nonce++; } Console.WriteLine("Difficulty: {0}", b.header.difficulty); Console.WriteLine("Nonce: {0}", b.header.nonce); Console.WriteLine("Hash: {0}", BitConverter.ToString(b.hash).Replace("-", "")); return(bc.CommitBlock(b)); }