mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-03 09:29:46 +00:00
Code style cleanup.
This commit is contained in:
parent
e352109431
commit
d31b3b7c76
1 changed files with 4 additions and 1 deletions
|
@ -180,6 +180,7 @@ int64_t xmrig::DaemonClient::submit(const JobResult &result)
|
||||||
|
|
||||||
std::map<std::string, std::string> headers;
|
std::map<std::string, std::string> headers;
|
||||||
headers.insert({"X-Hash-Difficulty", std::to_string(result.actualDiff())});
|
headers.insert({"X-Hash-Difficulty", std::to_string(result.actualDiff())});
|
||||||
|
|
||||||
return rpcSend(doc, headers);
|
return rpcSend(doc, headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,8 +559,10 @@ int64_t xmrig::DaemonClient::getBlockTemplate()
|
||||||
int64_t xmrig::DaemonClient::rpcSend(const rapidjson::Document &doc, const std::map<std::string, std::string> &headers)
|
int64_t xmrig::DaemonClient::rpcSend(const rapidjson::Document &doc, const std::map<std::string, std::string> &headers)
|
||||||
{
|
{
|
||||||
FetchRequest req(HTTP_POST, m_pool.host(), m_pool.port(), kJsonRPC, doc, m_pool.isTLS(), isQuiet());
|
FetchRequest req(HTTP_POST, m_pool.host(), m_pool.port(), kJsonRPC, doc, m_pool.isTLS(), isQuiet());
|
||||||
for (const auto &header: headers)
|
for (const auto &header : headers) {
|
||||||
req.headers.insert(header);
|
req.headers.insert(header);
|
||||||
|
}
|
||||||
|
|
||||||
fetch(tag(), std::move(req), m_httpListener);
|
fetch(tag(), std::move(req), m_httpListener);
|
||||||
|
|
||||||
return m_sequence++;
|
return m_sequence++;
|
||||||
|
|
Loading…
Reference in a new issue