From ced4d38255135a366cc96396911089ab4d37fe45 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 22 Oct 2019 19:21:23 -0700 Subject: [PATCH] Bunch of little things --- src/bitcoind.cpp | 17 +++++++++-------- src/deprecation.cpp | 5 +++-- src/main.cpp | 2 +- src/miner.cpp | 22 +++++++++++----------- src/rpc/misc.cpp | 2 -- src/sendalert.cpp | 4 ++-- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 655251638..bdd368530 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -150,7 +150,7 @@ bool AppInit(int argc, char* argv[]) // Process help and version before taking care about datadir if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) { - std::string strUsage = _("Komodo Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo(); + std::string strUsage = _("Hush Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo(); if (mapArgs.count("-version")) { @@ -159,7 +159,7 @@ bool AppInit(int argc, char* argv[]) else { strUsage += "\n" + _("Usage:") + "\n" + - " komodod [options] " + _("Start Komodo Daemon") + "\n"; + " komodod [options] " + _("Start Hush-flavored Komodo Daemon") + "\n"; strUsage += "\n" + HelpMessage(HMM_BITCOIND); } @@ -192,21 +192,22 @@ bool AppInit(int argc, char* argv[]) ReadConfigFile(mapArgs, mapMultiArgs); } catch (const missing_zcash_conf& e) { fprintf(stderr, - (_("Before starting komodod, you need to create a configuration file:\n" + (_("Before starting hushd, you need to create a configuration file:\n" "%s\n" "It can be completely empty! That indicates you are happy with the default\n" - "configuration of komodod. But requiring a configuration file to start ensures\n" - "that komodod won't accidentally compromise your privacy if there was a default\n" + "configuration of hushd. But requiring a configuration file to start ensures\n" + "that hushd won't accidentally compromise your privacy if there was a default\n" "option you needed to change.\n" "\n" "You can look at the example configuration file for suggestions of default\n" "options that you may want to change. It should be in one of these locations,\n" - "depending on how you installed Komodo:\n") + + "depending on how you installed Hush\n") + _("- Source code: %s\n" "- .deb package: %s\n")).c_str(), GetConfigFile().string().c_str(), - "contrib/debian/examples/komodo.conf", - "/usr/share/doc/komodo/examples/komodo.conf"); + "contrib/debian/examples/HUSH3.conf", + "/usr/share/doc/hush/examples/HUSH3.conf", + "https://github.com/MyHush/hush3/blob/master/contrib/debian/examples/HUSH3.conf"); return false; } catch (const std::exception& e) { fprintf(stderr,"Error reading configuration file: %s\n", e.what()); diff --git a/src/deprecation.cpp b/src/deprecation.cpp index 6005918ec..99ec30e4f 100644 --- a/src/deprecation.cpp +++ b/src/deprecation.cpp @@ -1,4 +1,5 @@ // Copyright (c) 2017 The Zcash developers +// Copyright (c) 2018-2019 The Hush developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -48,7 +49,7 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) { if (blocksToDeprecation == 0 || forceLogging) { msg = strprintf(_("This version has been deprecated as of block height %d."), DEPRECATION_HEIGHT) + " " + - _("You should upgrade to the latest version of Komodo."); + _("You should upgrade to the latest version of Hush! See Discord for more info: https://myhush.org/discord"); LogPrintf("*** %s\n", msg); CAlert::Notify(msg, fThread); uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_ERROR); @@ -57,7 +58,7 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) { } else if (blocksToDeprecation == DEPRECATION_WARN_LIMIT || (blocksToDeprecation < DEPRECATION_WARN_LIMIT && forceLogging)) { msg = strprintf(_("This version will be deprecated at block height %d, and will automatically shut down."), DEPRECATION_HEIGHT) + " " + - _("You should upgrade to the latest version of Komodo."); + _("You should upgrade to the latest version of Hush! See Discord for more info: https://myhush.org/discord"); LogPrintf("*** %s\n", msg); CAlert::Notify(msg, fThread); uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_WARNING); diff --git a/src/main.cpp b/src/main.cpp index 38bba3d26..6052839f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -141,7 +141,7 @@ static void CheckBlockIndex(); /** Constant stuff for coinbase transactions we create: */ CScript COINBASE_FLAGS; -const string strMessageMagic = "Komodo Signed Message:\n"; +const string strMessageMagic = "Hush Signed Message:\n"; // Internal stuff namespace { diff --git a/src/miner.cpp b/src/miner.cpp index 5b0d2658f..e3c88afb7 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1032,7 +1032,7 @@ static bool ProcessBlockFound(CBlock* pblock) fprintf(stderr,"%02x",((uint8_t *)&hash)[i]); fprintf(stderr," <- chainTip (stale)\n"); - return error("KomodoMiner: generated block is stale"); + return error("HushMiner: generated block is stale"); } } @@ -1058,7 +1058,7 @@ static bool ProcessBlockFound(CBlock* pblock) // Process this block the same as if we had received it from another node CValidationState state; if (!ProcessNewBlock(1,chainActive.LastTip()->GetHeight()+1,state, NULL, pblock, true, NULL)) - return error("KomodoMiner: ProcessNewBlock, block not accepted"); + return error("HushMiner: ProcessNewBlock, block not accepted"); TrackMinedBlock(pblock->GetHash()); //komodo_broadcast(pblock,16); @@ -1615,7 +1615,7 @@ void static BitcoinMiner(CWallet *pwallet) void static BitcoinMiner() #endif { - LogPrintf("KomodoMiner started\n"); + LogPrintf("HushMiner started\n"); SetThreadPriority(THREAD_PRIORITY_LOWEST); RenameThread("komodo-miner"); const CChainParams& chainparams = Params(); @@ -1715,7 +1715,7 @@ void static BitcoinMiner() { miningTimer.stop(); c.disconnect(); - LogPrintf("KomodoMiner terminated\n"); + LogPrintf("HushMiner terminated\n"); return; } static uint32_t counter; @@ -1729,10 +1729,10 @@ void static BitcoinMiner() if (!pblocktemplate.get()) { if (GetArg("-mineraddress", "").empty()) { - LogPrintf("Error in KomodoMiner: Keypool ran out, please call keypoolrefill before restarting the mining thread\n"); + LogPrintf("Error in HushMiner: Keypool ran out, please call keypoolrefill before restarting the mining thread\n"); } else { // Should never reach here, because -mineraddress validity is checked in init.cpp - LogPrintf("Error in KomodoMiner: Invalid -mineraddress\n"); + LogPrintf("Error in HushMiner: Invalid -mineraddress\n"); } return; } @@ -1752,8 +1752,8 @@ void static BitcoinMiner() } } IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); - //fprintf(stderr,"Running KomodoMiner.%s with %u transactions in block\n",solver.c_str(),(int32_t)pblock->vtx.size()); - LogPrintf("Running KomodoMiner.%s with %u transactions in block (%u bytes)\n",solver.c_str(),pblock->vtx.size(),::GetSerializeSize(*pblock,SER_NETWORK,PROTOCOL_VERSION)); + //fprintf(stderr,"Running HushMiner.%s with %u transactions in block\n",solver.c_str(),(int32_t)pblock->vtx.size()); + LogPrintf("Running HushMiner.%s with %u transactions in block (%u bytes)\n",solver.c_str(),pblock->vtx.size(),::GetSerializeSize(*pblock,SER_NETWORK,PROTOCOL_VERSION)); // // Search // @@ -1929,7 +1929,7 @@ void static BitcoinMiner() KOMODO_CHOSEN_ONE = 1; // Found a solution SetThreadPriority(THREAD_PRIORITY_NORMAL); - LogPrintf("KomodoMiner:\n"); + LogPrintf("HushMiner:\n"); LogPrintf("proof-of-work found \n hash: %s \ntarget: %s\n", B.GetHash().GetHex(), HASHTarget.GetHex()); #ifdef ENABLE_WALLET if (ProcessBlockFound(&B, *pwallet, reservekey)) { @@ -2072,14 +2072,14 @@ void static BitcoinMiner() { miningTimer.stop(); c.disconnect(); - LogPrintf("KomodoMiner terminated\n"); + LogPrintf("HushMiner terminated\n"); throw; } catch (const std::runtime_error &e) { miningTimer.stop(); c.disconnect(); - LogPrintf("KomodoMiner runtime error: %s\n", e.what()); + LogPrintf("HushMiner runtime error: %s\n", e.what()); return; } miningTimer.stop(); diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index f7b6659c5..86e6d44ea 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -79,7 +79,6 @@ uint64_t komodo_notarypayamount(int32_t nHeight, int64_t notarycount); int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp); #define KOMODO_VERSION "0.4.0a" -#define VERUS_VERSION "0.4.0g" extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT; extern uint32_t ASSETCHAINS_CC; extern uint32_t ASSETCHAINS_MAGIC,ASSETCHAINS_ALGO; @@ -238,7 +237,6 @@ UniValue getinfo(const UniValue& params, bool fHelp) obj.push_back(Pair("protocolversion", PROTOCOL_VERSION)); obj.push_back(Pair("KMDversion", KOMODO_VERSION)); obj.push_back(Pair("synced", KOMODO_INSYNC!=0)); - //obj.push_back(Pair("VRSCversion", VERUS_VERSION)); obj.push_back(Pair("notarized", notarized_height)); obj.push_back(Pair("prevMoMheight", prevMoMheight)); obj.push_back(Pair("notarizedhash", notarized_hash.ToString())); diff --git a/src/sendalert.cpp b/src/sendalert.cpp index 6525cb356..7b8ca4589 100644 --- a/src/sendalert.cpp +++ b/src/sendalert.cpp @@ -42,7 +42,7 @@ Modify the alert parameters, id and message found in this file. Build and run with -sendalert or -printalert. -./zcashd -printtoconsole -sendalert +./hushd -printtoconsole -sendalert One minute after starting up, the alert will be broadcast. It is then flooded through the network until the nRelayUntil time, and will be @@ -103,7 +103,7 @@ void ThreadSendAlert() // 4000 or higher will put the RPC into safe mode alert.nPriority = 4000; alert.strComment = ""; - alert.strStatusBar = "Your client version has degraded networking behavior. Please update to the most recent version of Komodo (0.3.3 or later)."; + alert.strStatusBar = "Your client version has degraded networking behavior. Please update to the most recent version of Hush (3.2.0 or later)."; alert.strRPCError = alert.strStatusBar; // Set specific client version/versions here. If setSubVer is empty, no filtering on subver is done: