Skip to content

Commit

Permalink
Aligned with XMRigCC 3.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendr0id committed May 15, 2023
1 parent 066545b commit 897fb4d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
23 changes: 19 additions & 4 deletions src/proxy/splitters/donate/DonateMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,18 @@ xmrig::DonateMapper::DonateMapper(uint64_t id, LoginEvent *event, const Pool &po
m_miner(event->miner()),
m_id(id)
{
const rapidjson::Value &algo = event->params["algo"];
const rapidjson::Value& algo = event->params["algo"];
if (algo.IsArray()) {
for (const rapidjson::Value &value : algo.GetArray()) {
m_algorithms.emplace_back(value.GetString());
}
for (const rapidjson::Value &value : algo.GetArray()) {
m_algorithms.emplace_back(value.GetString());
}
}

const rapidjson::Value& supports = event->params["supports"];
if (supports.IsArray()) {
for (const rapidjson::Value &value : supports.GetArray()) {
m_supports.emplace_back(value.GetString());
}
}

m_miner->setRouteId(0);
Expand Down Expand Up @@ -104,6 +111,14 @@ void xmrig::DonateMapper::onLogin(IClient *, rapidjson::Document &doc, rapidjson
}

params.AddMember("algo", algo, allocator);

rapidjson::Value supports(kArrayType);

for (const String &s : m_supports) {
supports.PushBack(s.toJSON(), allocator);
}

params.AddMember("supports", supports, allocator);
}


Expand Down
1 change: 1 addition & 0 deletions src/proxy/splitters/donate/DonateMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class DonateMapper : public IClientListener
IClient *m_client;
Miner *m_miner;
std::vector<String> m_algorithms;
std::vector<String> m_supports;
uint64_t m_diff = 0;
uint64_t m_id;
};
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
#define APP_ID "xmrigcc-proxy"
#define APP_NAME "xmrigcc-proxy"
#define APP_DESC "XMRigCC Stratum proxy"
#define APP_VERSION "3.3.2 compatible with XMRigCC 3.3.2"
#define APP_VERSION "3.3.3 aligned with XMRigCC 3.3.3"
#define APP_DOMAIN ""
#define APP_SITE ""
#define APP_COPYRIGHT ""
#define APP_KIND "proxy"

#define APP_VER_MAJOR 3
#define APP_VER_MINOR 3
#define APP_VER_PATCH 2
#define APP_VER_PATCH 3

#ifdef _MSC_VER
# if (_MSC_VER >= 1930)
Expand Down

0 comments on commit 897fb4d

Please sign in to comment.