Refactored ASM code
- Removed duplicate code - Autogenerated ASM files based on templates - Cleanup in naming
This commit is contained in:
parent
6574a8e844
commit
2ec65c7a20
63 changed files with 712 additions and 6907 deletions
|
@ -52,6 +52,7 @@ int64_t Client::m_sequence = 1;
|
|||
Client::Client(int id, const char *agent, IClientListener *listener) :
|
||||
m_quiet(false),
|
||||
m_nicehash(false),
|
||||
m_donate(false),
|
||||
m_agent(agent),
|
||||
m_listener(listener),
|
||||
m_id(id),
|
||||
|
@ -231,7 +232,7 @@ bool Client::parseJob(const rapidjson::Value ¶ms, int *code)
|
|||
|
||||
PowVariant powVariant = Options::i()->powVariant();
|
||||
|
||||
if (!Options::i()->forcePowVariant()) {
|
||||
if (!Options::i()->forcePowVariant() || m_donate) {
|
||||
if (params.HasMember("algo")) {
|
||||
std::string algo = params["algo"].GetString();
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ public:
|
|||
inline int id() const { return m_id; }
|
||||
inline uint16_t port() const { return m_url.port(); }
|
||||
inline void setQuiet(bool quiet) { m_quiet = quiet; }
|
||||
inline void setDonate(bool donate) { m_donate = donate; }
|
||||
inline void setRetryPause(int ms) { m_retryPause = ms; }
|
||||
|
||||
static void onConnected(uv_async_t *handle);
|
||||
|
@ -99,6 +100,7 @@ private:
|
|||
|
||||
bool m_quiet;
|
||||
bool m_nicehash;
|
||||
bool m_donate;
|
||||
char m_buf[2048];
|
||||
char m_rpcId[64];
|
||||
char m_sendBuf[768];
|
||||
|
|
|
@ -150,9 +150,9 @@ PowVariant Job::powVariant() const
|
|||
} else {
|
||||
return PowVariant::POW_V0;
|
||||
}
|
||||
} else if (m_powVariant == PowVariant::POW_XTL) {
|
||||
if (m_blob[0] > 5) {
|
||||
return PowVariant::POW_XTL_V9;
|
||||
} else if (m_powVariant == PowVariant::POW_MSR) {
|
||||
if (m_blob[0] > 8) {
|
||||
return PowVariant::POW_FAST_2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
bool operator!=(const Job &other) const;
|
||||
|
||||
private:
|
||||
uint8_t m_blob[96]; // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk.
|
||||
uint8_t m_blob[MAX_BLOB_SIZE]; // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk.
|
||||
|
||||
bool m_nicehash;
|
||||
int m_poolId;
|
||||
|
|
|
@ -81,6 +81,7 @@ DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
|
|||
m_client->setUrl(url);
|
||||
m_client->setRetryPause(Options::i()->retryPause() * 1000);
|
||||
m_client->setQuiet(true);
|
||||
m_client->setDonate(true);
|
||||
|
||||
delete url;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue