mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-05 16:07:42 +00:00
Fix for automatic variant specified by pool/proxy.
This commit is contained in:
parent
f1a1e0814c
commit
3a7e8647bb
3 changed files with 23 additions and 4 deletions
|
@ -170,6 +170,16 @@ bool Job::setTarget(const char *target)
|
|||
}
|
||||
|
||||
|
||||
void Job::setAlgorithm(const char *algo)
|
||||
{
|
||||
m_algorithm.parseAlgorithm(algo);
|
||||
|
||||
if (m_algorithm.variant() == xmrig::VARIANT_AUTO) {
|
||||
m_algorithm.setVariant(variant());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Job::fromHex(const char* in, unsigned int len, unsigned char* out)
|
||||
{
|
||||
bool error = false;
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
|
||||
bool setBlob(const char *blob);
|
||||
bool setTarget(const char *target);
|
||||
void setAlgorithm(const char *algo);
|
||||
|
||||
inline bool isNicehash() const { return m_nicehash; }
|
||||
inline bool isValid() const { return m_size > 0 && m_diff > 0; }
|
||||
|
@ -60,7 +61,6 @@ public:
|
|||
inline uint32_t diff() const { return static_cast<uint32_t>(m_diff); }
|
||||
inline uint64_t target() const { return m_target; }
|
||||
inline void reset() { m_size = 0; m_diff = 0; }
|
||||
inline void setAlgorithm(const char *algo) { m_algorithm.parseAlgorithm(algo); }
|
||||
inline void setClientId(const xmrig::Id &id) { m_clientId = id; }
|
||||
inline void setPoolId(int poolId) { m_poolId = poolId; }
|
||||
inline void setThreadId(int threadId) { m_threadId = threadId; }
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __XMRIG_H__
|
||||
#define __XMRIG_H__
|
||||
#ifndef XMRIG_XMRIG_H
|
||||
#define XMRIG_XMRIG_H
|
||||
|
||||
|
||||
namespace xmrig
|
||||
|
@ -85,7 +85,16 @@ enum AesMode {
|
|||
};
|
||||
|
||||
|
||||
enum OclVendor {
|
||||
OCL_VENDOR_UNKNOWN = -2,
|
||||
OCL_VENDOR_MANUAL = -1,
|
||||
OCL_VENDOR_AMD = 0,
|
||||
OCL_VENDOR_NVIDIA = 1,
|
||||
OCL_VENDOR_INTEL = 2
|
||||
};
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif /* __XMRIG_H__ */
|
||||
#endif /* XMRIG_XMRIG_H */
|
||||
|
|
Loading…
Reference in a new issue