From e6ec40190c702c4bb9f2c6c4cd6972a5cef731c6 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 11:50:39 -0400 Subject: [PATCH] algo now reflects N & K if equihash --- src/rpc/misc.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 83b15a92f..50dd62090 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -348,7 +348,15 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) if ( ASSETCHAINS_COMMISSION != 0 ) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) + { obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + if ( ASSETCHAINS_NK[0] == 0 ) // display default for Hush + obj.push_back(Pair("algo N",200)); + else obj.push_back(Pair("algo N",ASSETCHAINS_NK[0])); + if ( ASSETCHAINS_NK[1] == 0 ) // display default for Hush + obj.push_back(Pair("algo K",9)); + else obj.push_back(Pair("algo K",ASSETCHAINS_NK[1])); + } else obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj;