Added "donate-over-proxy" option.
This commit is contained in:
parent
55686c7d57
commit
0907d1eb0c
15 changed files with 229 additions and 141 deletions
|
@ -57,7 +57,6 @@
|
|||
#include "base/io/Json.h"
|
||||
#include "common/config/CommonConfig.h"
|
||||
#include "common/log/Log.h"
|
||||
#include "donate.h"
|
||||
#include "rapidjson/document.h"
|
||||
#include "rapidjson/filewritestream.h"
|
||||
#include "rapidjson/prettywriter.h"
|
||||
|
@ -75,7 +74,6 @@ xmrig::CommonConfig::CommonConfig() :
|
|||
m_syslog(false),
|
||||
m_watch(true),
|
||||
m_apiPort(0),
|
||||
m_donateLevel(kDefaultDonateLevel),
|
||||
m_printTime(60),
|
||||
m_state(NoneState)
|
||||
{
|
||||
|
@ -397,9 +395,11 @@ bool xmrig::CommonConfig::parseInt(int key, int arg)
|
|||
break;
|
||||
|
||||
case DonateLevelKey: /* --donate-level */
|
||||
if (arg >= kMinimumDonateLevel && arg <= 99) {
|
||||
m_donateLevel = arg;
|
||||
}
|
||||
m_pools.setDonateLevel(arg);
|
||||
break;
|
||||
|
||||
case ProxyDonateKey: /* --donate-over-proxy */
|
||||
m_pools.setProxyDonate(arg);
|
||||
break;
|
||||
|
||||
case ApiPort: /* --api-port */
|
||||
|
|
|
@ -53,7 +53,6 @@ public:
|
|||
inline const char *userAgent() const { return m_userAgent.data(); }
|
||||
inline const Pools &pools() const { return m_pools; }
|
||||
inline int apiPort() const { return m_apiPort; }
|
||||
inline int donateLevel() const { return m_donateLevel; }
|
||||
inline int printTime() const { return m_printTime; }
|
||||
|
||||
inline bool isWatch() const override { return m_watch && !m_fileName.isNull(); }
|
||||
|
@ -91,7 +90,6 @@ protected:
|
|||
bool m_syslog;
|
||||
bool m_watch;
|
||||
int m_apiPort;
|
||||
int m_donateLevel;
|
||||
int m_printTime;
|
||||
Pools m_pools;
|
||||
State m_state;
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
TlsKey = 1013,
|
||||
FingerprintKey = 1014,
|
||||
AutoSaveKey = 1016,
|
||||
ProxyDonateKey = 1017,
|
||||
|
||||
// xmrig common
|
||||
CPUPriorityKey = 1021,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue