예제 #1
0
 /// <summary>
 /// Method to mine a blocks' hash
 /// </summary>
 /// <param name="difficulty"></param>
 public void MineBlock(int difficulty)
 {
     while (BlockHash.Substring(0, difficulty) != new string('0', difficulty))
     {
         _shaSalt++;
         BlockHash = CalculateHash();
     }
     betBlock.CalculateHash();
 }
예제 #2
0
파일: Block.cs 프로젝트: msw85/Private
        public void MineBlock(int difficulty)
        {
            while (BlockHash.Substring(0, difficulty) != new string('0', difficulty))
            {
                _shaSalt++;
                BlockHash = CalculateHash();
                Console.WriteLine("Currently mining: " + BlockHash);
            }

            Console.WriteLine("Block " + BlockHash + " have been mined!");
        }