Allow result submission to origin daemon with self-select

With `self-select` mode enabled, the `submit-to-origin` config option
will let the `SelfSelectClient` submit the solution to both
the daemon where it got the template from as well as to
the connected pool, for miners that want to do pool minining
with Monero and solo mining with an altcoin (merged mining variant).

Thank you and special credit to @StriderDM (https://github.com/StriderDM)!
This commit is contained in:
Hansie Odendaal 2021-02-17 18:05:13 +02:00
parent d2f01cfa86
commit 3b87cd97ce
No known key found for this signature in database
GPG key ID: D341DA7FC6098627
12 changed files with 86 additions and 9 deletions

View file

@ -260,6 +260,7 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
case IConfig::DryRunKey: /* --dry-run */
case IConfig::HttpEnabledKey: /* --http-enabled */
case IConfig::DaemonKey: /* --daemon */
case IConfig::SubmitToOriginKey: /* --submit-to-origin */
case IConfig::VerboseKey: /* --verbose */
case IConfig::PauseOnBatteryKey: /* --pause-on-battery */
case IConfig::PauseOnActiveKey: /* --pause-on-active */
@ -291,6 +292,8 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b
case IConfig::TlsKey: /* --tls */
return add(doc, Pools::kPools, Pool::kTls, enable);
case IConfig::SubmitToOriginKey: /* --submit-to-origin */
return add(doc, Pools::kPools, Pool::kSubmitToOrigin, enable);
# ifdef XMRIG_FEATURE_HTTP
case IConfig::DaemonKey: /* --daemon */
return add(doc, Pools::kPools, Pool::kDaemon, enable);

View file

@ -73,6 +73,7 @@ public:
DaemonKey = 1018,
DaemonPollKey = 1019,
SelfSelectKey = 1028,
SubmitToOriginKey = 1049,
DataDirKey = 1035,
TitleKey = 1037,
NoTitleKey = 1038,