Merge xmrig v6.3.3

This commit is contained in:
MoneroOcean 2020-08-28 08:18:41 -07:00
commit a6b6f22d08
25 changed files with 192 additions and 94 deletions

View file

@ -81,7 +81,13 @@ private:
#define CLEAR CSI "0m" // all attributes off
#define BRIGHT_BLACK_S CSI "0;90m" // somewhat MD.GRAY
#define BLACK_S CSI "0;30m"
#define BLACK_BOLD_S CSI "1;30m" // another name for GRAY
#ifdef XMRIG_OS_APPLE
# define BLACK_BOLD_S CSI "0;37m"
#else
# define BLACK_BOLD_S CSI "1;30m" // another name for GRAY
#endif
#define RED_S CSI "0;31m"
#define RED_BOLD_S CSI "1;31m"
#define GREEN_S CSI "0;32m"

View file

@ -84,7 +84,7 @@ static int showVersion()
# if defined(LIBRESSL_VERSION_TEXT)
printf("LibreSSL/%s\n", LIBRESSL_VERSION_TEXT + 9);
# elif defined(OPENSSL_VERSION_TEXT)
constexpr const char *v = OPENSSL_VERSION_TEXT + 8;
constexpr const char *v = &OPENSSL_VERSION_TEXT[8];
printf("OpenSSL/%.*s\n", static_cast<int>(strchr(v, ' ') - v), v);
# endif
}

View file

@ -176,7 +176,7 @@ void xmrig::BaseConfig::printVersions()
snprintf(buf, sizeof buf, "LibreSSL/%s ", LIBRESSL_VERSION_TEXT + 9);
libs += buf;
# elif defined(OPENSSL_VERSION_TEXT)
constexpr const char *v = OPENSSL_VERSION_TEXT + 8;
constexpr const char *v = &OPENSSL_VERSION_TEXT[8];
snprintf(buf, sizeof buf, "OpenSSL/%.*s ", static_cast<int>(strchr(v, ' ') - v), v);
libs += buf;
# endif

View file

@ -29,13 +29,20 @@ namespace xmrig {
class HttpListener : public IHttpListener
{
public:
inline HttpListener(IHttpListener *listener, const char *tag = nullptr) : m_tag(tag), m_listener(listener) {}
inline HttpListener(IHttpListener *listener, const char *tag = nullptr) :
# ifdef APP_DEBUG
m_tag(tag),
# endif
m_listener(listener)
{}
protected:
void onHttpData(const HttpData &data) override;
private:
# ifdef APP_DEBUG
const char *m_tag;
# endif
IHttpListener *m_listener;
};

View file

@ -65,7 +65,7 @@ public:
void setDiff(uint64_t diff);
inline bool isNicehash() const { return m_nicehash; }
inline bool isValid() const { return m_size > 0 && m_diff > 0; }
inline bool isValid() const { return (m_size > 0 && m_diff > 0) || !m_poolWallet.isEmpty(); }
inline bool setId(const char *id) { return m_id = id; }
inline const Algorithm &algorithm() const { return m_algorithm; }
inline const Buffer &seed() const { return m_seed; }