Allow null algorithm for pools.
This commit is contained in:
parent
b73c204e73
commit
6990324681
5 changed files with 56 additions and 32 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue