Skip to content

Commit

Permalink
disable dev fee in solo mining mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mining-visualizer committed Jun 15, 2018
1 parent 683cddf commit 915b78b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
18 changes: 13 additions & 5 deletions ethminer/MinerAux.h
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,22 @@ class MinerCLI
{
#define FEEBLOCKTIME 4 * 60 * 60 // devFee switching is done in 4 hour blocks

string sDevPercent = ProgOpt::Get("General", "DevFee", "1.0");
float nDevPercent;
if (!isNumeric(sDevPercent))
nDevPercent = 1.0;

if (m_opMode != OperationMode::Pool)
{
nDevPercent = 0.0;
}
else
{
nDevPercent = std::stod(sDevPercent);
nDevPercent = nDevPercent < 1.0 ? 1.0 : nDevPercent;
string sDevPercent = ProgOpt::Get("General", "DevFee", "1.0");
if (!isNumeric(sDevPercent))
nDevPercent = 1.0;
else
{
nDevPercent = std::stod(sDevPercent);
nDevPercent = nDevPercent < 1.0 ? 1.0 : nDevPercent;
}
}

_devFeeTime = nDevPercent / 100.0 * FEEBLOCKTIME;
Expand Down
1 change: 1 addition & 0 deletions libethash-cl/ethash_cl_miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ bool ethash_cl_miner::init(unsigned _platformId, unsigned _deviceId)
string platformName = string(platforms[_platformId].getInfo<CL_PLATFORM_NAME>().c_str());

int platformId = OPENCL_PLATFORM_UNKNOWN;

if (platformName == "NVIDIA CUDA")
{
platformId = OPENCL_PLATFORM_NVIDIA;
Expand Down

0 comments on commit 915b78b

Please sign in to comment.