Added ENV support for "user", "pass" and "rig-id" fields.
This commit is contained in:
parent
356e666e61
commit
5bd6a1c028
6 changed files with 33 additions and 13 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue