Esempio n. 1
0
 public static bool ShouldGroup(MiningPair a, MiningPair b)
 {
     // group if same bin path and same algo type
     if (IsSameBinPath(a, b) && IsSameAlgorithmType(a, b))
     {
         AlgorithmType algorithmType = a.Algorithm.NiceHashID;
         // AlgorithmType.Equihash is special case
         if (AlgorithmType.Equihash == algorithmType)
         {
             string minerPath = MinerPaths.GetOptimizedMinerPath(a);
             return(EquihashGroup.IsEquihashGroupLogic(minerPath,
                                                       a, b));
         }
         // all other algorithms are grouped if DeviceType is same and is not CPU
         else if (IsNotCpuGroups(a, b) && IsSameDeviceType(a, b))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
        public static bool ShouldGroup(MiningPair a, MiningPair b)
        {
            bool canGroup = IsGroupableMinerBaseType(a) && IsGroupableMinerBaseType(b);

            // group if same bin path and same algo type
            if (canGroup && IsSameBinPath(a, b) && IsSameAlgorithmType(a, b))
            {
                AlgorithmType algorithmType = a.Algorithm.NiceHashID;
                // AlgorithmType.Equihash is special case
                if (AlgorithmType.Equihash == algorithmType)
                {
                    return(EquihashGroup.IsEquihashGroupLogic(a.Algorithm.MinerBaseType,
                                                              a, b));
                }
                // all other algorithms are grouped if DeviceType is same and is not CPU
                else if (IsNotCpuGroups(a, b) && IsSameDeviceType(a, b))
                {
                    return(true);
                }
            }
            return(false);
        }