mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-10 01:02:40 -05:00
Added ENV support for "user", "pass" and "rig-id" fields.
This commit is contained in:
@@ -23,16 +23,19 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "base/kernel/interfaces/IClientListener.h"
|
||||
#include "base/net/stratum/BaseClient.h"
|
||||
#include "base/kernel/Env.h"
|
||||
#include "base/kernel/interfaces/IClientListener.h"
|
||||
#include "base/net/stratum/SubmitResult.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
int64_t BaseClient::m_sequence = 1;
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
@@ -43,6 +46,19 @@ xmrig::BaseClient::BaseClient(int id, IClientListener *listener) :
|
||||
}
|
||||
|
||||
|
||||
void xmrig::BaseClient::setPool(const Pool &pool)
|
||||
{
|
||||
if (!pool.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_pool = pool;
|
||||
m_user = Env::expand(pool.user());
|
||||
m_password = Env::expand(pool.password());
|
||||
m_rigId = Env::expand(pool.rigId());
|
||||
}
|
||||
|
||||
|
||||
bool xmrig::BaseClient::handleResponse(int64_t id, const rapidjson::Value &result, const rapidjson::Value &error)
|
||||
{
|
||||
if (id == 1) {
|
||||
|
||||
Reference in New Issue
Block a user