Return getinfo algo as a single key
This commit is contained in:
@@ -347,17 +347,14 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
|
|
||||||
if ( ASSETCHAINS_COMMISSION != 0 )
|
if ( ASSETCHAINS_COMMISSION != 0 )
|
||||||
obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION));
|
obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION));
|
||||||
if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH )
|
if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) {
|
||||||
{
|
uint64_t N = ASSETCHAINS_NK[0] ? ASSETCHAINS_NK[0] : 200;
|
||||||
|
uint64_t K = ASSETCHAINS_NK[1] ? ASSETCHAINS_NK[1] : 9;
|
||||||
|
std::string equihash_algo = "equihash (" + std::to_string(N) + "," + std::to_string(K) + ")";
|
||||||
|
obj.push_back(Pair("algo",equihash_algo));
|
||||||
|
} else {
|
||||||
obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO]));
|
obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO]));
|
||||||
if ( ASSETCHAINS_NK[0] == 0 ) // display default for Hush
|
}
|
||||||
obj.push_back(Pair("equihash N", 200));
|
|
||||||
else obj.push_back(Pair("equihash N", ASSETCHAINS_NK[0]));
|
|
||||||
if ( ASSETCHAINS_NK[1] == 0 ) // display default for Hush
|
|
||||||
obj.push_back(Pair("equihash K", 9));
|
|
||||||
else obj.push_back(Pair("equihash K", ASSETCHAINS_NK[1]));
|
|
||||||
}
|
|
||||||
else obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO]));
|
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user