From 915b78b8cbd55ddc8cca0c7298d16c7e76093f34 Mon Sep 17 00:00:00 2001 From: mvis Date: Fri, 15 Jun 2018 11:12:45 -0700 Subject: [PATCH] disable dev fee in solo mining mode --- ethminer/MinerAux.h | 18 +++++++++++++----- libethash-cl/ethash_cl_miner.cpp | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ethminer/MinerAux.h b/ethminer/MinerAux.h index a36b3f8..a009d67 100644 --- a/ethminer/MinerAux.h +++ b/ethminer/MinerAux.h @@ -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; diff --git a/libethash-cl/ethash_cl_miner.cpp b/libethash-cl/ethash_cl_miner.cpp index e715b2d..3a9302a 100644 --- a/libethash-cl/ethash_cl_miner.cpp +++ b/libethash-cl/ethash_cl_miner.cpp @@ -640,6 +640,7 @@ bool ethash_cl_miner::init(unsigned _platformId, unsigned _deviceId) string platformName = string(platforms[_platformId].getInfo().c_str()); int platformId = OPENCL_PLATFORM_UNKNOWN; + if (platformName == "NVIDIA CUDA") { platformId = OPENCL_PLATFORM_NVIDIA;