Skip to content
This repository was archived by the owner on Oct 21, 2019. It is now read-only.

Commit 76a5ee7

Browse files
committed
don't try to submit solutions when not connected.
1 parent a523715 commit 76a5ee7

16 files changed

Lines changed: 9 additions & 4 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
cmake_minimum_required(VERSION 2.8.12)
33

44
set(PROJECT_VERSION "0.9.41")
5-
set(GENOIL_VERSION "1.1.3")
5+
set(GENOIL_VERSION "1.1.4")
66
if (${CMAKE_VERSION} VERSION_GREATER 3.0)
77
cmake_policy(SET CMP0042 OLD) # fix MACOSX_RPATH
88
cmake_policy(SET CMP0048 NEW) # allow VERSION argument in project()

ethminer/MinerAux.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,12 @@ class MinerCLI
10081008

10091009
f.onSolutionFound([&](EthashProofOfWork::Solution sol)
10101010
{
1011-
client.submit(sol);
1011+
if (client.isConnected()) {
1012+
client.submit(sol);
1013+
}
1014+
else {
1015+
cwarn << "Can't submit solution: Not connected";
1016+
}
10121017
return false;
10131018
});
10141019

libstratum/EthStratumClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class EthStratumClient
2828
void setFailover(string const & host, string const & port, string const & user, string const & pass);
2929

3030
bool isRunning() { return m_running; }
31-
bool isConnected() { return m_connected; }
31+
bool isConnected() { return m_connected && m_authorized; }
3232
h256 currentHeaderHash() { return m_current.headerHash; }
3333
bool current() { return m_current; }
3434
unsigned waitState() { return m_waitState; }

libstratum/EthStratumClientV2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class EthStratumClientV2 : public Worker
2929
void setFailover(string const & host, string const & port, string const & user, string const & pass);
3030

3131
bool isRunning() { return m_running; }
32-
bool isConnected() { return m_connected; }
32+
bool isConnected() { return m_connected && m_authorized; }
3333
h256 currentHeaderHash() { return m_current.headerHash; }
3434
bool current() { return m_current; }
3535
unsigned waitState() { return m_waitState; }
-831 KB
Binary file not shown.
-802 KB
Binary file not shown.
-802 KB
Binary file not shown.
-723 KB
Binary file not shown.
-769 KB
Binary file not shown.
-789 KB
Binary file not shown.

0 commit comments

Comments
 (0)