Add nice messages for accepted and rejected shares with diff and latency.
This commit is contained in:
parent
71522214ae
commit
074db6bb72
17 changed files with 128 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue