Implement job result submitting.
This commit is contained in:
parent
a0a8711dab
commit
6774f86fcd
8 changed files with 92 additions and 6 deletions
|
@ -39,6 +39,8 @@ Network::Network(const Options *options) :
|
|||
m_pool(0),
|
||||
m_diff(0)
|
||||
{
|
||||
Workers::setListener(this);
|
||||
|
||||
m_pools.reserve(2);
|
||||
m_agent = userAgent();
|
||||
|
||||
|
@ -103,6 +105,13 @@ void Network::onJobReceived(Client *client, const Job &job)
|
|||
}
|
||||
|
||||
|
||||
void Network::onJobResult(const JobResult &result)
|
||||
{
|
||||
LOG_NOTICE("SHARE FOUND");
|
||||
m_pools[result.poolId]->submit(result);
|
||||
}
|
||||
|
||||
|
||||
void Network::onLoginCredentialsRequired(Client *client)
|
||||
{
|
||||
client->login(m_options->user(), m_options->pass(), m_agent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue