Merge pull request 'algo always displayed with getinfo RPC' (#147) from jahway603/hush3:randomx into randomx

Reviewed-on: https://git.hush.is/hush/hush3/pulls/147
This commit is contained in:
Duke Leto
2022-07-12 21:53:59 +00:00
2 changed files with 14 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
Duke Leto https://git.hush.is/duke https://github.com/leto Duke Leto https://git.hush.is/duke https://github.com/leto
Miodrag https://github.com/miodragpop Miodrag https://github.com/miodragpop
jahway603 https://git.hush.is/jahway603 https://github.com/jahway603
# The SuperNET Developers # The SuperNET Developers

View File

@@ -1,6 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers // 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 // Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/****************************************************************************** /******************************************************************************
@@ -347,8 +347,17 @@ 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 )
{
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;
} }