Skip to content

Commit 41281b2

Browse files
handle dev mining under stratum differently
1 parent e114997 commit 41281b2

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# cmake global
22
cmake_minimum_required(VERSION 2.8.12)
33

4-
set(PROJECT_VERSION "2.1.19")
4+
set(PROJECT_VERSION "2.1.20")
55
if (${CMAKE_VERSION} VERSION_GREATER 3.0)
66
cmake_policy(SET CMP0042 OLD) # fix MACOSX_RPATH
77
cmake_policy(SET CMP0048 NEW) # allow VERSION argument in project()

libstratum/EthStratumClient.cpp

+9-8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ EthStratumClient::EthStratumClient(
3535
m_host = checkHost(host);
3636
m_port = port;
3737
m_userAcct = userAcct;
38+
m_shareAcct = userAcct;
3839

3940
m_authorized = false;
4041
m_connected = false;
@@ -303,7 +304,7 @@ void EthStratumClient::submitWork(h256 _nonce, bytes _hash, bytes _challenge, ui
303304
msg["id"] = 4;
304305
msg["method"] = "mining.submit";
305306
msg["params"].append("0x" + _nonce.hex());
306-
msg["params"].append(m_userAcct);
307+
msg["params"].append(m_shareAcct);
307308
msg["params"].append("0x" + toHex(_hash));
308309
msg["params"].append((Json::UInt64)_difficulty);
309310
msg["params"].append("0x" + toHex(_challenge));
@@ -345,11 +346,11 @@ bool EthStratumClient::isConnected()
345346

346347
void EthStratumClient::switchAcct(string _newAcct)
347348
{
348-
m_verbose = false;
349-
disconnect();
350-
m_userAcct = _newAcct;
351-
this_thread::sleep_for(chrono::milliseconds(50));
352-
restart();
353-
this_thread::sleep_for(chrono::milliseconds(50));
354-
m_verbose = true;
349+
//m_verbose = false;
350+
//disconnect();
351+
m_shareAcct = _newAcct;
352+
//this_thread::sleep_for(chrono::milliseconds(50));
353+
//restart();
354+
//this_thread::sleep_for(chrono::milliseconds(50));
355+
//m_verbose = true;
355356
}

libstratum/EthStratumClient.h

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class EthStratumClient
103103
uint64_t m_difficulty;
104104
std::string m_hashingAcct;
105105
std::string m_userAcct;
106+
std::string m_shareAcct;
106107

107108
Mutex x_work;
108109
};

0 commit comments

Comments
 (0)