BitCoinClient.Worker.DoHashes C# (CSharp) Method

DoHashes() private method

private DoHashes ( uint start, uint count ) : uint
start uint
count uint
return uint
        uint DoHashes(uint start, uint count)
        {
            uint[] hashout = new uint[8];
            uint end = start + count;
            uint hashesDone = 0;
            for (uint i = start; i < end; i++, hashesDone++)
            {
                // Write i into data
                //i = 2083236893;
                mData[3] = Program.Byteswap(i);

                //sha256_block_data_order(hash1, mMidstate, mData);
                //sha256_block_data_order(hashout, staticHashInit, hash1);
                SHATransform(hash1, mMidstate, mData);
                SHATransform(hashout, staticHashInit, hash1);

                // Check
                if (hashout[7] == 0)
                {
                    for (int k = 6; k >= 0; k--)
                    {
                        if (hashout[k] > mTarget[k])
                            break;
                        if (hashout[k] < mTarget[k])
                        {
                            // Solution found
                            hashesDone++;
                            SendWorkComplete(true, i, mHashesDone + hashesDone);
                            return hashesDone;
                        }
                    }
                }
            }

            return hashesDone;
        }