Restored algorithm verification.
This commit is contained in:
parent
88edde804f
commit
691b2fabbf
13 changed files with 56 additions and 23 deletions
|
@ -213,6 +213,16 @@ void xmrig::Network::onResultAccepted(IStrategy *, IClient *, const SubmitResult
|
|||
}
|
||||
|
||||
|
||||
void xmrig::Network::onVerifyAlgorithm(IStrategy *, const IClient *, const Algorithm &algorithm, bool *ok)
|
||||
{
|
||||
if (!m_controller->miner()->isEnabled(algorithm)) {
|
||||
*ok = false;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void xmrig::Network::setJob(IClient *client, const Job &job, bool donate)
|
||||
{
|
||||
if (job.height()) {
|
||||
|
|
|
@ -67,6 +67,7 @@ protected:
|
|||
void onPause(IStrategy *strategy) override;
|
||||
void onRequest(IApiRequest &request) override;
|
||||
void onResultAccepted(IStrategy *strategy, IClient *client, const SubmitResult &result, const char *error) override;
|
||||
void onVerifyAlgorithm(IStrategy *strategy, const IClient *client, const Algorithm &algorithm, bool *ok) override;
|
||||
|
||||
private:
|
||||
constexpr static int kTickInterval = 1 * 1000;
|
||||
|
|
|
@ -57,6 +57,8 @@ protected:
|
|||
inline void onJobReceived(IClient *client, const Job &job, const rapidjson::Value &) override { setJob(client, job); }
|
||||
inline void onResultAccepted(IClient *client, const SubmitResult &result, const char *error) override { setResult(client, result, error); }
|
||||
inline void onResultAccepted(IStrategy *, IClient *client, const SubmitResult &result, const char *error) override { setResult(client, result, error); }
|
||||
inline void onVerifyAlgorithm(const IClient *, const Algorithm &, bool *) override {}
|
||||
inline void onVerifyAlgorithm(IStrategy *, const IClient *, const Algorithm &, bool *) override {}
|
||||
inline void resume() override {}
|
||||
|
||||
int64_t submit(const JobResult &result) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue