Code and copyright cleanup.
This commit is contained in:
parent
3b87cd97ce
commit
5980675876
9 changed files with 80 additions and 108 deletions
|
@ -1,13 +1,8 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2019 jtgrassie <https://github.com/jtgrassie>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2019 jtgrassie <https://github.com/jtgrassie>
|
||||
* Copyright (c) 2021 Hansie Odendaal <https://github.com/hansieodendaal>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -31,11 +26,10 @@
|
|||
#include "base/kernel/interfaces/IClientListener.h"
|
||||
#include "base/net/http/HttpListener.h"
|
||||
#include "base/net/stratum/Job.h"
|
||||
#include "base/tools/Object.h"
|
||||
|
||||
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
@ -46,7 +40,7 @@ class SelfSelectClient : public IClient, public IClientListener, public IHttpLis
|
|||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(SelfSelectClient)
|
||||
|
||||
SelfSelectClient(int id, const char *agent, IClientListener *listener, bool submit_to_origin);
|
||||
SelfSelectClient(int id, const char *agent, IClientListener *listener, bool submitToOrigin);
|
||||
~SelfSelectClient() override;
|
||||
|
||||
protected:
|
||||
|
@ -66,7 +60,6 @@ protected:
|
|||
inline int64_t send(const rapidjson::Value &obj, Callback callback) override { return m_client->send(obj, callback); }
|
||||
inline int64_t send(const rapidjson::Value &obj) override { return m_client->send(obj); }
|
||||
inline int64_t sequence() const override { return m_client->sequence(); }
|
||||
inline int64_t submit(const JobResult &result) override;
|
||||
inline void connect() override { m_client->connect(); }
|
||||
inline void connect(const Pool &pool) override { m_client->connect(pool); }
|
||||
inline void deleteLater() override { m_client->deleteLater(); }
|
||||
|
@ -78,6 +71,7 @@ protected:
|
|||
inline void setRetries(int retries) override { m_client->setRetries(retries); m_retries = retries; }
|
||||
inline void setRetryPause(uint64_t ms) override { m_client->setRetryPause(ms); m_retryPause = ms; }
|
||||
|
||||
int64_t submit(const JobResult &result) override;
|
||||
void tick(uint64_t now) override;
|
||||
|
||||
// IClientListener
|
||||
|
@ -106,25 +100,26 @@ private:
|
|||
void retry();
|
||||
void setState(State state);
|
||||
void submitBlockTemplate(rapidjson::Value &result);
|
||||
inline void submitOriginDaemon(const JobResult &result);
|
||||
bool m_active = false;
|
||||
bool m_quiet = false;
|
||||
void submitOriginDaemon(const JobResult &result);
|
||||
|
||||
bool m_active = false;
|
||||
bool m_quiet = false;
|
||||
const bool m_submitToOrigin;
|
||||
IClient *m_client;
|
||||
IClientListener *m_listener;
|
||||
int m_retries = 5;
|
||||
int64_t m_failures = 0;
|
||||
int64_t m_sequence = 1;
|
||||
int m_retries = 5;
|
||||
int64_t m_failures = 0;
|
||||
int64_t m_sequence = 1;
|
||||
Job m_job;
|
||||
State m_state = IdleState;
|
||||
String m_blocktemplate;
|
||||
bool m_submit_to_origin = false;
|
||||
State m_state = IdleState;
|
||||
std::map<int64_t, SubmitResult> m_results;
|
||||
std::shared_ptr<IHttpListener> m_httpListener;
|
||||
uint64_t m_retryPause = 5000;
|
||||
uint64_t m_timestamp = 0;
|
||||
uint64_t m_blockdiff = 0;
|
||||
uint64_t m_origin_submitted = 0;
|
||||
uint64_t m_origin_not_submitted = 0;
|
||||
String m_blocktemplate;
|
||||
uint64_t m_blockDiff = 0;
|
||||
uint64_t m_originNotSubmitted = 0;
|
||||
uint64_t m_originSubmitted = 0;
|
||||
uint64_t m_retryPause = 5000;
|
||||
uint64_t m_timestamp = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue