mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-24 21:32:47 -05:00
Allow null algorithm for pools.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
|
||||
#include "crypto/common/Algorithm.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@@ -111,6 +112,14 @@ static AlgoName const algorithm_names[] = {
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
rapidjson::Value xmrig::Algorithm::toJSON() const
|
||||
{
|
||||
using namespace rapidjson;
|
||||
|
||||
return isValid() ? Value(StringRef(shortName())) : Value(kNullType);
|
||||
}
|
||||
|
||||
|
||||
xmrig::Algorithm::Family xmrig::Algorithm::family(Id id)
|
||||
{
|
||||
switch (id) {
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include "rapidjson/fwd.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
@@ -91,6 +94,8 @@ public:
|
||||
inline bool operator==(const Algorithm &other) const { return isEqual(other); }
|
||||
inline operator Algorithm::Id() const { return m_id; }
|
||||
|
||||
rapidjson::Value toJSON() const;
|
||||
|
||||
static Family family(Id id);
|
||||
static Id parse(const char *name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user