mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-13 18:12:50 -05:00
Add nice messages for accepted and rejected shares with diff and latency.
This commit is contained in:
@@ -84,6 +84,12 @@ void DonateStrategy::onLoginSuccess(Client *client)
|
||||
}
|
||||
|
||||
|
||||
void DonateStrategy::onResultAccepted(Client *client, uint32_t diff, uint64_t ms, const char *error)
|
||||
{
|
||||
m_listener->onResultAccepted(client, diff, ms, error);
|
||||
}
|
||||
|
||||
|
||||
void DonateStrategy::idle()
|
||||
{
|
||||
uv_timer_start(&m_timer, DonateStrategy::onTimer, m_idleTime, 0);
|
||||
|
||||
@@ -53,6 +53,7 @@ protected:
|
||||
void onClose(Client *client, int failures) override;
|
||||
void onJobReceived(Client *client, const Job &job) override;
|
||||
void onLoginSuccess(Client *client) override;
|
||||
void onResultAccepted(Client *client, uint32_t diff, uint64_t ms, const char *error) override;
|
||||
|
||||
private:
|
||||
void idle();
|
||||
|
||||
@@ -111,6 +111,12 @@ void FailoverStrategy::onLoginSuccess(Client *client)
|
||||
}
|
||||
|
||||
|
||||
void FailoverStrategy::onResultAccepted(Client *client, uint32_t diff, uint64_t ms, const char *error)
|
||||
{
|
||||
m_listener->onResultAccepted(client, diff, ms, error);
|
||||
}
|
||||
|
||||
|
||||
void FailoverStrategy::add(const Url *url, const char *agent)
|
||||
{
|
||||
Client *client = new Client(m_pools.size(), agent, this);
|
||||
|
||||
@@ -53,6 +53,7 @@ protected:
|
||||
void onClose(Client *client, int failures) override;
|
||||
void onJobReceived(Client *client, const Job &job) override;
|
||||
void onLoginSuccess(Client *client) override;
|
||||
void onResultAccepted(Client *client, uint32_t diff, uint64_t ms, const char *error) override;
|
||||
|
||||
private:
|
||||
void add(const Url *url, const char *agent);
|
||||
|
||||
@@ -82,3 +82,9 @@ void SinglePoolStrategy::onLoginSuccess(Client *client)
|
||||
m_active = true;
|
||||
m_listener->onActive(client);
|
||||
}
|
||||
|
||||
|
||||
void SinglePoolStrategy::onResultAccepted(Client *client, uint32_t diff, uint64_t ms, const char *error)
|
||||
{
|
||||
m_listener->onResultAccepted(client, diff, ms, error);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ protected:
|
||||
void onClose(Client *client, int failures) override;
|
||||
void onJobReceived(Client *client, const Job &job) override;
|
||||
void onLoginSuccess(Client *client) override;
|
||||
void onResultAccepted(Client *client, uint32_t diff, uint64_t ms, const char *error) override;
|
||||
|
||||
private:
|
||||
bool m_active;
|
||||
|
||||
Reference in New Issue
Block a user