Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

NVIDIA and SC support for ClaymoreDual #985

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions NiceHashMiner/Algorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ public AlgorithmType DualNiceHashID() {
return AlgorithmType.DaggerLbry;
case AlgorithmType.Pascal:
return AlgorithmType.DaggerPascal;
case AlgorithmType.Sia:
return AlgorithmType.DaggerSia;
}
}
return NiceHashID;
}
public bool IsDual() {
return (DualNiceHashID() == AlgorithmType.DaggerDecred ||
DualNiceHashID() == AlgorithmType.DaggerLbry ||
DualNiceHashID() == AlgorithmType.DaggerPascal);
return (AlgorithmType.DaggerSia <= DualNiceHashID() && DualNiceHashID() <= AlgorithmType.DaggerPascal);
}
}
}
15 changes: 14 additions & 1 deletion NiceHashMiner/Devices/GroupAlgorithms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ public static Dictionary<MinerBaseType, List<Algorithm>> CreateDefaultsForGroup(
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, ""),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Decred),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Lbry),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Pascal)
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Pascal),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Sia)
}
},
{ MinerBaseType.OptiminerAMD,
Expand Down Expand Up @@ -242,6 +243,15 @@ public static Dictionary<MinerBaseType, List<Algorithm>> CreateDefaultsForGroup(
new Algorithm(MinerBaseType.experimental, AlgorithmType.NeoScrypt, "neoscrypt")
}
},
{ MinerBaseType.ClaymoreAMD,
new List<Algorithm>() {
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, ""),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Decred),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Lbry),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Pascal),
new Algorithm(MinerBaseType.ClaymoreAMD, AlgorithmType.DaggerHashimoto, "", AlgorithmType.Sia)
}
},
};
if (DeviceGroupType.NVIDIA_6_x == deviceGroupType) {
ToRemoveAlgoTypes.AddRange(new AlgorithmType[] {
Expand Down Expand Up @@ -275,6 +285,9 @@ public static Dictionary<MinerBaseType, List<Algorithm>> CreateDefaultsForGroup(
AlgorithmType.Pascal,
AlgorithmType.X11Gost
});
ToRemoveMinerTypes.AddRange(new MinerBaseType[] {
MinerBaseType.ClaymoreAMD
});
}

// filter unused
Expand Down
1 change: 1 addition & 0 deletions NiceHashMiner/Enums/AlgorithmType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace NiceHashMiner.Enums
public enum AlgorithmType : int
{
// dual algos for grouping
DaggerSia = -6,
DaggerDecred = -5,
DaggerLbry = -4,
DaggerPascal = -3,
Expand Down
6 changes: 4 additions & 2 deletions NiceHashMiner/Miners/ClaymoreDual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public string SecondaryShortName() {
return "lbc";
case AlgorithmType.Pascal:
return "pasc";
case AlgorithmType.Sia:
return "sc";
}
return "";
}
Expand Down Expand Up @@ -79,7 +81,7 @@ private string GetStartCommand(string url, string btcAdress, string worker) {
}
} else {
string urlSecond = Globals.GetLocationURL(SecondaryAlgorithmType, Globals.MiningLocation[ConfigManager.GeneralConfig.ServiceLocation], this.ConectionType);
dualModeParams = String.Format(" -dcoin {0} -dpool {1} -dwal {2}", SecondaryShortName(), urlSecond, username);
dualModeParams = String.Format(" -dcoin {0} -dpool {1} -dwal {2} -dpsw x", SecondaryShortName(), urlSecond, username);
}

return " "
Expand Down Expand Up @@ -110,7 +112,7 @@ protected override string BenchmarkCreateCommandLine(Algorithm algorithm, int ti
benchmarkTimeWait = time;
return ret + " -benchmark 1";
} else {
benchmarkTimeWait = Math.Max(120, time); // dual seems to stop mining after this time if redirect output is true
benchmarkTimeWait = Math.Min(120, time); // dual seems to stop mining after this time if redirect output is true
return ret; // benchmark 1 does not output secondary speeds
}
}
Expand Down
2 changes: 2 additions & 0 deletions NiceHashMiner/Miners/Miner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public AlgorithmType DualAlgorithmID() {
return AlgorithmType.DaggerLbry;
case AlgorithmType.Pascal:
return AlgorithmType.DaggerPascal;
case AlgorithmType.Sia:
return AlgorithmType.DaggerSia;
}
}
return AlgorithmID;
Expand Down
2 changes: 1 addition & 1 deletion NiceHashMiner/Utils/AlgorithmNiceHashNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace NiceHashMiner
public static class AlgorithmNiceHashNames
{
public static string GetName(AlgorithmType type) {
if ((AlgorithmType.INVALID <= type && type <= AlgorithmType.X11Gost) || (AlgorithmType.DaggerDecred <= type && type <= AlgorithmType.DaggerPascal)) {
if ((AlgorithmType.INVALID <= type && type <= AlgorithmType.X11Gost) || (AlgorithmType.DaggerSia <= type && type <= AlgorithmType.DaggerPascal)) {
return Enum.GetName(typeof(AlgorithmType), type);
}
return "NameNotFound type not supported";
Expand Down