Code style cleanup.

This commit is contained in:
XMRig 2023-03-25 20:56:25 +07:00
parent e352109431
commit d31b3b7c76
No known key found for this signature in database
GPG Key ID: 446A53638BE94409

View File

@ -180,6 +180,7 @@ int64_t xmrig::DaemonClient::submit(const JobResult &result)
std::map<std::string, std::string> headers;
headers.insert({"X-Hash-Difficulty", std::to_string(result.actualDiff())});
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)
{
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);
}
fetch(tag(), std::move(req), m_httpListener);
return m_sequence++;