Skip to content

Commit 915b78b

Browse files
disable dev fee in solo mining mode
1 parent 683cddf commit 915b78b

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

ethminer/MinerAux.h

+13-5
Original file line numberDiff line numberDiff line change
@@ -799,14 +799,22 @@ class MinerCLI
799799
{
800800
#define FEEBLOCKTIME 4 * 60 * 60 // devFee switching is done in 4 hour blocks
801801

802-
string sDevPercent = ProgOpt::Get("General", "DevFee", "1.0");
803802
float nDevPercent;
804-
if (!isNumeric(sDevPercent))
805-
nDevPercent = 1.0;
803+
804+
if (m_opMode != OperationMode::Pool)
805+
{
806+
nDevPercent = 0.0;
807+
}
806808
else
807809
{
808-
nDevPercent = std::stod(sDevPercent);
809-
nDevPercent = nDevPercent < 1.0 ? 1.0 : nDevPercent;
810+
string sDevPercent = ProgOpt::Get("General", "DevFee", "1.0");
811+
if (!isNumeric(sDevPercent))
812+
nDevPercent = 1.0;
813+
else
814+
{
815+
nDevPercent = std::stod(sDevPercent);
816+
nDevPercent = nDevPercent < 1.0 ? 1.0 : nDevPercent;
817+
}
810818
}
811819

812820
_devFeeTime = nDevPercent / 100.0 * FEEBLOCKTIME;

libethash-cl/ethash_cl_miner.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ bool ethash_cl_miner::init(unsigned _platformId, unsigned _deviceId)
640640
string platformName = string(platforms[_platformId].getInfo<CL_PLATFORM_NAME>().c_str());
641641

642642
int platformId = OPENCL_PLATFORM_UNKNOWN;
643+
643644
if (platformName == "NVIDIA CUDA")
644645
{
645646
platformId = OPENCL_PLATFORM_NVIDIA;

0 commit comments

Comments
 (0)