1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-04-18 05:22:28 -04:00

DaemonClient: new X-Hash-Difficulty HTTP header optimization

If the caller knows the difficulty of a PoW hash a given nonce
yields, it can tell the callee via the X-Hash-Difficulty, which
may allow the callee to skip some processing if the difficulty
does not meet some criterion.

In my case, a merge mining proxy can know it's pointless trying
to submit the nonce to a chain with higher difficulty when the
nonce only meets the difficulty for a lower difficulty chain.
This commit is contained in:
moneromooo-monero
2023-03-25 09:42:49 +00:00
parent 9508332258
commit 88b0385bfe
2 changed files with 7 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ private:
bool parseJob(const rapidjson::Value &params, int *code);
bool parseResponse(int64_t id, const rapidjson::Value &result, const rapidjson::Value &error);
int64_t getBlockTemplate();
int64_t rpcSend(const rapidjson::Document &doc);
int64_t rpcSend(const rapidjson::Document &doc, const std::map<std::string, std::string> &headers = {});
void retry();
void send(const char *path);
void setState(SocketState state);