Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Commit

Permalink
Cleanup PoolClient
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed May 22, 2018
1 parent 11133f7 commit a713f03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 0 additions & 2 deletions libethcore/Farm.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class Farm: public FarmFace
};

Farm(boost::asio::io_service & io_service):
m_io_service(io_service),
m_io_strand(io_service),
m_hashrateTimer(io_service)
{
Expand Down Expand Up @@ -441,7 +440,6 @@ class Farm: public FarmFace

// std::thread m_serviceThread; ///< The IO service thread.

boost::asio::io_service & m_io_service; // The IO service reference passed in the constructor
boost::asio::io_service::strand m_io_strand;
boost::asio::deadline_timer m_hashrateTimer;
std::vector<WorkingProgress> m_lastProgresses;
Expand Down
3 changes: 3 additions & 0 deletions libpoolprotocols/PoolClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ namespace dev
class PoolClient
{
public:
virtual ~PoolClient() noexcept = default;


void setConnection(URI &conn)
{
m_conn = conn;
Expand Down
10 changes: 5 additions & 5 deletions libpoolprotocols/stratum/EthStratumClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ class EthStratumClient : public PoolClient
EthStratumClient(boost::asio::io_service & io_service, int worktimeout, int responsetimeout, string const & email, bool const & submitHashrate);
~EthStratumClient();

void connect();
void disconnect();
void connect() override;
void disconnect() override;

// Connected and Connection Statuses
bool isConnected() override { return m_connected.load(std::memory_order_relaxed) && !isPendingState(); }
bool isPendingState() override { return (m_connecting.load(std::memory_order_relaxed) || m_disconnecting.load(std::memory_order_relaxed));}

bool isSubscribed() { return m_subscribed.load(std::memory_order_relaxed); }
bool isAuthorized() { return m_authorized.load(std::memory_order_relaxed); }
string ActiveEndPoint() { return " [" + toString(m_endpoint) + "]"; };
string ActiveEndPoint() override { return " [" + toString(m_endpoint) + "]"; };

void submitHashrate(string const & rate);
void submitSolution(Solution solution);
void submitHashrate(string const & rate) override;
void submitSolution(Solution solution) override;

h256 currentHeaderHash() { return m_current.header; }
bool current() { return static_cast<bool>(m_current); }
Expand Down

0 comments on commit a713f03

Please sign in to comment.