Skip to content

Commit

Permalink
Fix kernel arguments not being passed to backend miners on non-Window…
Browse files Browse the repository at this point in the history
…s systems
  • Loading branch information
nwoolls committed Jan 11, 2018
1 parent 5ac76ca commit 6f150e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 9 additions & 2 deletions MultiMiner.Engine/MiningEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -973,15 +973,22 @@ private Xgminer.Data.Configuration.Miner CreateBasicConfiguration(

SetupConfigurationPools(minerConfiguration, coinConfiguration);

SetupConfigurationArguments(minerConfiguration, coinConfiguration);
SetupConfigurationArguments(minerConfiguration, coinConfiguration, miner);

return minerConfiguration;
}

private void SetupConfigurationArguments(Xgminer.Data.Configuration.Miner minerConfiguration, Data.Configuration.Coin coinConfiguration)
private void SetupConfigurationArguments(Xgminer.Data.Configuration.Miner minerConfiguration, Data.Configuration.Coin coinConfiguration,
MinerDescriptor miner)
{
string arguments = string.Empty;

//apply algorithm kernel arguments
if (minerConfiguration.Algorithm.MinerArguments.ContainsKey(miner.Name))
{
arguments = String.Format("{0} {0} {1}", arguments, minerConfiguration.Algorithm.MinerArguments[miner.Name], arguments.TrimStart());
}

//apply algorithm-specific parameters
if (engineConfiguration.XgminerConfiguration.AlgorithmFlags.ContainsKey(coinConfiguration.PoolGroup.Algorithm))
arguments = String.Format("{0} {1}", arguments,
Expand Down
5 changes: 0 additions & 5 deletions MultiMiner.Xgminer/Miner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,6 @@ public Process Launch(string reason = "")
}
}
}

string minerName = Path.GetFileName(Path.GetDirectoryName(minerConfiguration.ExecutablePath));

if (minerConfiguration.Algorithm.MinerArguments.ContainsKey(minerName))
arguments = String.Format("{0} {1}", minerConfiguration.Algorithm.MinerArguments[minerName], arguments.TrimStart());

if (minerConfiguration.ApiListen)
{
Expand Down

0 comments on commit 6f150e2

Please sign in to comment.