mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-06 09:32:46 -05:00
Restored algo field in login request.
This commit is contained in:
@@ -113,7 +113,7 @@ void xmrig::FailoverStrategy::resume()
|
||||
}
|
||||
|
||||
|
||||
void xmrig::FailoverStrategy::setAlgo(const xmrig::Algorithm &algo)
|
||||
void xmrig::FailoverStrategy::setAlgo(const Algorithm &algo)
|
||||
{
|
||||
for (IClient *client : m_pools) {
|
||||
client->setAlgo(algo);
|
||||
@@ -163,6 +163,12 @@ void xmrig::FailoverStrategy::onClose(IClient *client, int failures)
|
||||
}
|
||||
|
||||
|
||||
void xmrig::FailoverStrategy::onLogin(IClient *client, rapidjson::Document &doc, rapidjson::Value ¶ms)
|
||||
{
|
||||
m_listener->onLogin(this, client, doc, params);
|
||||
}
|
||||
|
||||
|
||||
void xmrig::FailoverStrategy::onJobReceived(IClient *client, const Job &job, const rapidjson::Value &)
|
||||
{
|
||||
if (m_active == client->id()) {
|
||||
|
||||
@@ -51,9 +51,8 @@ public:
|
||||
void add(const Pool &pool);
|
||||
|
||||
protected:
|
||||
inline bool isActive() const override { return m_active >= 0; }
|
||||
inline IClient *client() const override { return isActive() ? active() : m_pools[m_index]; }
|
||||
inline void onLogin(IClient *, rapidjson::Document &, rapidjson::Value &) override {}
|
||||
inline bool isActive() const override { return m_active >= 0; }
|
||||
inline IClient *client() const override { return isActive() ? active() : m_pools[m_index]; }
|
||||
|
||||
int64_t submit(const JobResult &result) override;
|
||||
void connect() override;
|
||||
@@ -64,6 +63,7 @@ protected:
|
||||
|
||||
void onClose(IClient *client, int failures) override;
|
||||
void onJobReceived(IClient *client, const Job &job, const rapidjson::Value ¶ms) override;
|
||||
void onLogin(IClient *client, rapidjson::Document &doc, rapidjson::Value ¶ms) override;
|
||||
void onLoginSuccess(IClient *client) override;
|
||||
void onResultAccepted(IClient *client, const SubmitResult &result, const char *error) override;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ void xmrig::SinglePoolStrategy::resume()
|
||||
}
|
||||
|
||||
|
||||
void xmrig::SinglePoolStrategy::setAlgo(const xmrig::Algorithm &algo)
|
||||
void xmrig::SinglePoolStrategy::setAlgo(const Algorithm &algo)
|
||||
{
|
||||
m_client->setAlgo(algo);
|
||||
}
|
||||
@@ -119,6 +119,12 @@ void xmrig::SinglePoolStrategy::onJobReceived(IClient *client, const Job &job, c
|
||||
}
|
||||
|
||||
|
||||
void xmrig::SinglePoolStrategy::onLogin(IClient *client, rapidjson::Document &doc, rapidjson::Value ¶ms)
|
||||
{
|
||||
m_listener->onLogin(this, client, doc, params);
|
||||
}
|
||||
|
||||
|
||||
void xmrig::SinglePoolStrategy::onLoginSuccess(IClient *client)
|
||||
{
|
||||
m_active = true;
|
||||
|
||||
@@ -45,9 +45,8 @@ public:
|
||||
~SinglePoolStrategy() override;
|
||||
|
||||
protected:
|
||||
inline bool isActive() const override { return m_active; }
|
||||
inline IClient *client() const override { return m_client; }
|
||||
inline void onLogin(IClient *, rapidjson::Document &, rapidjson::Value &) override {}
|
||||
inline bool isActive() const override { return m_active; }
|
||||
inline IClient *client() const override { return m_client; }
|
||||
|
||||
int64_t submit(const JobResult &result) override;
|
||||
void connect() override;
|
||||
@@ -58,6 +57,7 @@ protected:
|
||||
|
||||
void onClose(IClient *client, int failures) override;
|
||||
void onJobReceived(IClient *client, const Job &job, const rapidjson::Value ¶ms) override;
|
||||
void onLogin(IClient *client, rapidjson::Document &doc, rapidjson::Value ¶ms) override;
|
||||
void onLoginSuccess(IClient *client) override;
|
||||
void onResultAccepted(IClient *client, const SubmitResult &result, const char *error) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user