From 68fe194c7ec5e4a6b2370f08f7eec03cbb898e0a Mon Sep 17 00:00:00 2001 From: Creepsky Date: Sat, 16 Jun 2018 17:27:03 +0200 Subject: [PATCH] Fix start nonce parsing bug #407 --- src/MinerUtil.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/MinerUtil.cpp b/src/MinerUtil.cpp index e8001bc..9ef80e9 100644 --- a/src/MinerUtil.cpp +++ b/src/MinerUtil.cpp @@ -224,19 +224,7 @@ std::string Burst::getVersionFromPlotFile(const std::string& path) std::string Burst::getStartNonceFromPlotFile(const std::string& path) { - auto filenamePos = path.find_last_of("/\\"); - - if (filenamePos == std::string::npos) - filenamePos = 0; - - auto fileNamePart = splitStr(path.substr(filenamePos + 1, path.length() - (filenamePos + 1)), '_'); - - auto nonceStartPart = fileNamePart[1]; - - if (isNumberStr(nonceStartPart)) - return nonceStartPart; - - return ""; + return getInformationFromPlotFile(path, 1); } std::string Burst::deadlineFormat(Poco::UInt64 seconds)