From 642ac9bda1f7c5efb2eac45bb00aa3919b26905a Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 00:12:13 -0400 Subject: [PATCH 1/5] algo all day long --- src/rpc/misc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 2933d7393..7a394dc89 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -295,7 +295,7 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) obj.push_back(Pair("testnet", Params().TestnetToBeDeprecatedFieldRPC())); obj.push_back(Pair("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK()))); obj.push_back(Pair("errors", GetWarnings("statusbar"))); - if ( NOTARY_PUBKEY33[0] != 0 ) { + if ( NOTARY_PUBKEY33[0] != 0 ) { char pubkeystr[65]; int32_t notaryid; std::string notaryname; if( (notaryid= hush_whoami(pubkeystr,(int32_t)chainActive.LastTip()->GetHeight(),hush_chainactive_timestamp())) >= 0 ) { obj.push_back(Pair("notaryid", notaryid)); @@ -347,8 +347,8 @@ 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])); + + obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj; } From dfc3056ede5033e8370a22809004689d8a22c8e3 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 01:08:55 -0400 Subject: [PATCH 2/5] algo twerking --- src/rpc/misc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 7a394dc89..83b15a92f 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -347,8 +347,9 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) if ( ASSETCHAINS_COMMISSION != 0 ) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); - - obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) + obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + else obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj; } From e6ec40190c702c4bb9f2c6c4cd6972a5cef731c6 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 11:50:39 -0400 Subject: [PATCH 3/5] 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; From 4768d302fd73888d27902361207ea77f5fd71eb7 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 11:56:10 -0400 Subject: [PATCH 4/5] added jahway603 to AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index d2d49e2e0..20bd581e2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,6 +2,7 @@ Duke Leto https://git.hush.is/duke https://github.com/leto Miodrag https://github.com/miodragpop +jahway603 https://git.hush.is/jahway603 https://github.com/jahway603 # The SuperNET Developers From f55b77f65282a50e42922eff7c27daa4f10d28bd Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 12 Jul 2022 17:19:00 -0400 Subject: [PATCH 5/5] changed algo N & K to equihash N & K --- src/rpc/misc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 50dd62090..5d01384fb 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -349,15 +349,15 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) { - 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("algo N",200)); - else obj.push_back(Pair("algo N",ASSETCHAINS_NK[0])); + 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("algo K",9)); - else obj.push_back(Pair("algo K",ASSETCHAINS_NK[1])); + 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])); + else obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj; }