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

@ -105,7 +105,8 @@ R"===(
"tls-fingerprint": null,
"daemon": false,
"socks5": null,
"self-select": null
"self-select": null,
"submit-to-origin": false
}
],
"print-time": 60,

View file

@ -57,6 +57,7 @@ static const option options[] = {
{ "daemon", 0, nullptr, IConfig::DaemonKey },
{ "daemon-poll-interval", 1, nullptr, IConfig::DaemonPollKey },
{ "self-select", 1, nullptr, IConfig::SelfSelectKey },
{ "submit-to-origin", 0, nullptr, IConfig::SubmitToOriginKey },
# endif
{ "av", 1, nullptr, IConfig::AVKey },
{ "background", 0, nullptr, IConfig::BackgroundKey },

View file

@ -64,6 +64,7 @@ static inline const std::string &usage()
u += " --daemon use daemon RPC instead of pool for solo mining\n";
u += " --daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)\n";
u += " --self-select=URL self-select block templates from URL\n";
u += " --submit-to-origin also submit solution back to self-select URL\n";
# endif
u += " -r, --retries=N number of times to retry before switch to backup server (default: 5)\n";