Browse Source

Merge branch 'branding' into dev

pull/35/head
Jonathan "Duke" Leto 7 years ago
parent
commit
669d5d65e5
  1. 1
      COPYING
  2. 14
      contrib/devtools/gen-manpages.sh
  3. 14
      doc/dnsseed-policy.md
  4. 6
      doc/files.md
  5. 2
      doc/init.md
  6. 10
      src/bitcoin-cli-res.rc
  7. 10
      src/bitcoin-cli.cpp
  8. 10
      src/bitcoin-tx-res.rc
  9. 7
      src/bitcoin-tx.cpp
  10. 10
      src/bitcoind-res.rc
  11. 3
      src/bitcoind.cpp
  12. 3
      src/clientversion.h
  13. 9
      src/deprecation.cpp
  14. 23
      src/init.cpp
  15. 4
      src/main.cpp
  16. 2
      src/metrics.cpp
  17. 21
      src/miner.cpp
  18. 8
      src/rpcmining.cpp
  19. 6
      src/rpcserver.cpp
  20. 2
      src/sendalert.cpp
  21. 5
      src/timedata.cpp
  22. 15
      src/util.cpp
  23. 4
      src/util.h
  24. 21
      src/wallet/rpcdump.cpp
  25. 83
      src/wallet/rpcwallet.cpp
  26. 2
      src/wallet/walletdb.cpp

1
COPYING

@ -1,3 +1,4 @@
Copyright (c) 2017 The Hush developers
Copyright (c) 2016-2017 The Zdash developers
Copyright (c) 2016-2017 The Zcash developers
Copyright (c) 2009-2015 The Bitcoin Core developers

14
contrib/devtools/gen-manpages.sh

@ -4,14 +4,14 @@ TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
SRCDIR=${SRCDIR:-$TOPDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}
ZCASHD=${ZCASHD:-$SRCDIR/zcashd}
ZCASHCLI=${ZCASHCLI:-$SRCDIR/zcash-cli}
ZCASHTX=${ZCASHTX:-$SRCDIR/zcash-tx}
HUSHD=${HUSHD:-$SRCDIR/hushd}
HUSHCLI=${HUSHCLI:-$SRCDIR/hush-cli}
HUSHTX=${HUSHTX:-$SRCDIR/hush-tx}
[ ! -x $ZCASHD ] && echo "$ZCASHD not found or not executable." && exit 1
[ ! -x $HUSHD ] && echo "$HUSHD not found or not executable." && exit 1
# The autodetected version git tag can screw up manpage output a little bit
ZECVERSTR=$($ZCASHCLI --version | head -n1 | awk '{ print $NF }')
ZECVERSTR=$($HUSHCLI --version | head -n1 | awk '{ print $NF }')
ZECVER=$(echo $ZECVERSTR | awk -F- '{ OFS="-"; NF--; print $0; }')
ZECCOMMIT=$(echo $ZECVERSTR | awk -F- '{ print $NF }')
@ -19,9 +19,9 @@ ZECCOMMIT=$(echo $ZECVERSTR | awk -F- '{ print $NF }')
# This gets autodetected fine for zcashd if --version-string is not set,
# but has different outcomes for zcash-cli.
echo "[COPYRIGHT]" > footer.h2m
$ZCASHD --version | sed -n '1!p' >> footer.h2m
$HUSHD --version | sed -n '1!p' >> footer.h2m
for cmd in $ZCASHD $ZCASHCLI $ZCASHTX; do
for cmd in $HUSHD $HUSHCLI $HUSHTX; do
cmdname="${cmd##*/}"
help2man -N --version-string=$ZECVER --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
sed -i "s/\\\-$ZECCOMMIT//g" ${MANDIR}/${cmdname}.1

14
doc/dnsseed-policy.md

@ -1,12 +1,12 @@
Expectations for DNS Seed operators
====================================
Zcash attempts to minimize the level of trust in DNS seeds,
Hush attempts to minimize the level of trust in DNS seeds,
but DNS seeds still pose a small amount of risk for the network.
As such, DNS seeds must be run by entities which have some minimum
level of trust within the Zcash community.
level of trust within the Hush community.
Other implementations of Zcash software may also use the same
Other implementations of Hush software may also use the same
seeds and may be more exposed. In light of this exposure, this
document establishes some basic expectations for operating DNS seeds.
@ -16,7 +16,7 @@ and not sell or transfer control of the DNS seed. Any hosting services
contracted by the operator are equally expected to uphold these expectations.
1. The DNS seed results must consist exclusively of fairly selected and
functioning Zcash nodes from the public network to the best of the
functioning Hush nodes from the public network to the best of the
operator's understanding and capability.
2. For the avoidance of doubt, the results may be randomized but must not
@ -26,7 +26,7 @@ urgent technical necessity and disclosed.
3. The results may not be served with a DNS TTL of less than one minute.
4. Any logging of DNS queries should be only that which is necessary
for the operation of the service or urgent health of the Zcash
for the operation of the service or urgent health of the Hush
network and must not be retained longer than necessary nor disclosed
to any third party.
@ -42,8 +42,8 @@ details of their operating practices.
related to the DNS seed operation.
If these expectations cannot be satisfied the operator should discontinue
providing services and contact the active Zcash development team as well as
creating an issue in the [Zcash repository](https://github.com/zcash/zcash).
providing services and contact the active Hush development team as well as
creating an issue in the [Hush repository](https://github.com/MyHush/hush).
Behavior outside of these expectations may be reasonable in some
situations but should be discussed in public in advance.

6
doc/files.md

@ -1,12 +1,12 @@
* zcash.conf: contains configuration settings for zcashd
* zcashd.pid: stores the process id of zcashd while running
* hush.conf: contains configuration settings for hushd
* hushd.pid: stores the process id of hushd while running
* blocks/blk000??.dat: block data (custom, 128 MiB per file)
* blocks/rev000??.dat; block undo data (custom)
* blocks/index/*; block index (LevelDB)
* chainstate/*; block chain state database (LevelDB)
* database/*: BDB database environment
* db.log: wallet database log file
* debug.log: contains debug information and general logging generated by zcashd
* debug.log: contains debug information and general logging generated by hushd
* fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation
* peers.dat: peer IP address database (custom format)
* wallet.dat: personal wallet (BDB) with keys and transactions

2
doc/init.md

@ -1,4 +1,4 @@
*** Warning: This document has not been updated for Zcash and may be inaccurate. ***
*** Warning: This document has not been updated for Hush and may be inaccurate. ***
Sample init scripts and service configuration for bitcoind
==========================================================

10
src/bitcoin-cli-res.rc

@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Zcash"
VALUE "FileDescription", "zcash-cli (JSON-RPC client for Zcash)"
VALUE "CompanyName", "Hush"
VALUE "FileDescription", "hush-cli (JSON-RPC client for hush)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "zcash-cli"
VALUE "InternalName", "hush-cli"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "zcash-cli.exe"
VALUE "ProductName", "zcash-cli"
VALUE "OriginalFilename", "hush-cli.exe"
VALUE "ProductName", "hush-cli"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END

10
src/bitcoin-cli.cpp

@ -28,7 +28,7 @@ std::string HelpMessageCli()
string strUsage;
strUsage += HelpMessageGroup(_("Options:"));
strUsage += HelpMessageOpt("-?", _("This help message"));
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "zcash.conf"));
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "hush.conf"));
strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory"));
strUsage += HelpMessageOpt("-testnet", _("Use the test network"));
strUsage += HelpMessageOpt("-regtest", _("Enter regression test mode, which uses a special chain in which blocks can be "
@ -69,12 +69,12 @@ static bool AppInitRPC(int argc, char* argv[])
//
ParseParameters(argc, argv);
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
std::string strUsage = _("Zcash RPC client version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();
std::string strUsage = _("Hush RPC client version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();
if (!mapArgs.count("-version")) {
strUsage += "\n" + _("Usage:") + "\n" +
" zcash-cli [options] <command> [params] " + _("Send command to Zcash") + "\n" +
" zcash-cli [options] help " + _("List commands") + "\n" +
" zcash-cli [options] help <command> " + _("Get help for a command") + "\n";
" hush-cli [options] <command> [params] " + _("Send command to Hush") + "\n" +
" hush-cli [options] help " + _("List commands") + "\n" +
" hush-cli [options] help <command> " + _("Get help for a command") + "\n";
strUsage += "\n" + HelpMessageCli();
} else {

10
src/bitcoin-tx-res.rc

@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Zcash"
VALUE "FileDescription", "zcash-tx (CLI Zcash transaction editor utility)"
VALUE "CompanyName", "Hush"
VALUE "FileDescription", "hush-tx (CLI Hush transaction editor utility)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "zcash-tx"
VALUE "InternalName", "hush-tx"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "zcash-tx.exe"
VALUE "ProductName", "zcash-tx"
VALUE "OriginalFilename", "hush-tx.exe"
VALUE "ProductName", "hush-tx"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END

7
src/bitcoin-tx.cpp

@ -1,4 +1,5 @@
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -44,10 +45,10 @@ static bool AppInitRawTx(int argc, char* argv[])
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help"))
{
// First part of help message is specific to this utility
std::string strUsage = _("Zcash zcash-tx utility version") + " " + FormatFullVersion() + "\n\n" +
std::string strUsage = _("Hush hush-tx utility version") + " " + FormatFullVersion() + "\n\n" +
_("Usage:") + "\n" +
" zcash-tx [options] <hex-tx> [commands] " + _("Update hex-encoded zcash transaction") + "\n" +
" zcash-tx [options] -create [commands] " + _("Create hex-encoded zcash transaction") + "\n" +
" hush-tx [options] <hex-tx> [commands] " + _("Update hex-encoded hush transaction") + "\n" +
" hush-tx [options] -create [commands] " + _("Create hex-encoded hush transaction") + "\n" +
"\n";
fprintf(stdout, "%s", strUsage.c_str());

10
src/bitcoind-res.rc

@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Zcash"
VALUE "FileDescription", "zcashd (Zcash node with a JSON-RPC server)"
VALUE "CompanyName", "Hush"
VALUE "FileDescription", "hushd (Hush node with a JSON-RPC server)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "zcashd"
VALUE "InternalName", "hushd"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "zcashd.exe"
VALUE "ProductName", "zcashd"
VALUE "OriginalFilename", "hushd.exe"
VALUE "ProductName", "hushd"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END

3
src/bitcoind.cpp

@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -101,7 +102,7 @@ bool AppInit(int argc, char* argv[])
try
{
ReadConfigFile(mapArgs, mapMultiArgs);
} catch (const missing_zcash_conf& e) {
} catch (const missing_hush_conf& e) {
fprintf(stderr,
(_("Before starting hushd, you need to create a configuration file:\n"
"%s\n"

3
src/clientversion.h

@ -1,5 +1,6 @@
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2017 The Zcash developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -39,7 +40,7 @@
#define DO_STRINGIZE(X) #X
//! Copyright string used in Windows .rc files
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers and The Zcash developers"
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers and The Zcash developers and The Hush developers"
/**
* bitcoind-res.rc includes this file, but it cannot cope with real c++ code.

9
src/deprecation.cpp

@ -1,4 +1,5 @@
// Copyright (c) 2017 The Zcash developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -24,7 +25,7 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging) {
if (blocksToDeprecation == 0 || forceLogging) {
auto msg = strprintf(_("This version has been deprecated as of block height %d."),
DEPRECATION_HEIGHT) + " " +
_("You should upgrade to the latest version of Zcash.");
_("You should upgrade to the latest version of Hush.");
if (!disableDeprecation) {
msg += " " + strprintf(_("To disable deprecation for this version, set %s%s."),
"-disabledeprecation=", CLIENT_VERSION_STR);
@ -41,15 +42,15 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging) {
if (disableDeprecation) {
msg = strprintf(_("This version will be deprecated at block height %d."),
DEPRECATION_HEIGHT) + " " +
_("You should upgrade to the latest version of Zcash.");
_("You should upgrade to the latest version of Hush.");
} else {
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 Zcash.") + " " +
_("You should upgrade to the latest version of Hush.") + " " +
strprintf(_("To disable deprecation for this version, set %s%s."),
"-disabledeprecation=", CLIENT_VERSION_STR);
}
LogPrintf("*** %s\n", msg);
uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_WARNING);
}
}
}

23
src/init.cpp

@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -184,7 +185,7 @@ void Shutdown()
/// for example if the data directory was found to be locked.
/// Be sure that anything that writes files or flushes caches only does this if the respective
/// module was initialized.
RenameThread("zcash-shutoff");
RenameThread("hush-shutoff");
mempool.AddTransactionsUpdated(1);
StopHTTPRPC();
@ -336,7 +337,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288));
strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3));
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "zcash.conf"));
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "hush.conf"));
if (mode == HMM_BITCOIND)
{
#if !defined(WIN32)
@ -353,7 +354,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
-(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS));
#ifndef WIN32
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "zcashd.pid"));
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "hushd.pid"));
#endif
strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. "
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
@ -598,7 +599,7 @@ void CleanupBlockRevFiles()
void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
{
RenameThread("zcash-loadblk");
RenameThread("hush-loadblk");
// -reindex
if (fReindex) {
CImportingNow imp;
@ -682,7 +683,7 @@ static void ZC_LoadParams()
if (!(boost::filesystem::exists(pk_path) && boost::filesystem::exists(vk_path))) {
uiInterface.ThreadSafeMessageBox(strprintf(
_("Cannot find the Zcash network parameters in the following directory:\n"
_("Cannot find the Hush network parameters in the following directory:\n"
"%s\n"
"Please run 'zcash-fetch-params' or './zcutil/fetch-params.sh' and then restart."),
ZC_GetParamsDir()),
@ -802,7 +803,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fLogIPs = GetBoolArg("-logips", false);
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
LogPrintf("Zcash version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
LogPrintf("Hush version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
// when specifying an explicit binding address, you want to listen on it
// even when -connect or -proxy is specified
@ -1047,7 +1048,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// Sanity check
if (!InitSanityCheck())
return InitError(_("Initialization sanity check failed. Zcash is shutting down."));
return InitError(_("Initialization sanity check failed. Hush is shutting down."));
std::string strDataDir = GetDataDir().string();
#ifdef ENABLE_WALLET
@ -1063,9 +1064,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
try {
static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
if (!lock.try_lock())
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Zcash is probably already running."), strDataDir));
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Hush is probably already running."), strDataDir));
} catch(const boost::interprocess::interprocess_exception& e) {
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Zcash is probably already running.") + " %s.", strDataDir, e.what()));
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Hush is probably already running.") + " %s.", strDataDir, e.what()));
}
#ifndef WIN32
@ -1586,10 +1587,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
#ifdef ENABLE_MINING
#ifndef ENABLE_WALLET
if (GetBoolArg("-minetolocalwallet", false)) {
return InitError(_("Zcash was not built with wallet support. Set -minetolocalwallet=0 to use -mineraddress, or rebuild Zcash with wallet support."));
return InitError(_("Hush was not built with wallet support. Set -minetolocalwallet=0 to use -mineraddress, or rebuild Hush with wallet support."));
}
if (GetArg("-mineraddress", "").empty() && GetBoolArg("-gen", false)) {
return InitError(_("Zcash was not built with wallet support. Set -mineraddress, or rebuild Zcash with wallet support."));
return InitError(_("Hush was not built with wallet support. Set -mineraddress, or rebuild Hush with wallet support."));
}
#endif // !ENABLE_WALLET

4
src/main.cpp

@ -41,7 +41,7 @@
using namespace std;
#if defined(NDEBUG)
# error "Zcash cannot be compiled without assertions."
# error "Hush cannot be compiled without assertions."
#endif
/**
@ -1960,7 +1960,7 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
static CCheckQueue<CScriptCheck> scriptcheckqueue(128);
void ThreadScriptCheck() {
RenameThread("zcash-scriptch");
RenameThread("hush-scriptch");
scriptcheckqueue.Thread();
}

2
src/metrics.cpp

@ -375,7 +375,7 @@ int printInitMessage()
void ThreadShowMetricsScreen()
{
// Make this thread recognisable as the metrics screen thread
RenameThread("zcash-metrics-screen");
RenameThread("hush-metrics-screen");
// Determine whether we should render a persistent UI or rolling metrics
bool isTTY = isatty(STDOUT_FILENO);

21
src/miner.cpp

@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -458,7 +459,7 @@ static bool ProcessBlockFound(CBlock* pblock)
{
LOCK(cs_main);
if (pblock->hashPrevBlock != chainActive.Tip()->GetBlockHash())
return error("ZcashMiner: generated block is stale");
return error("HushMiner: generated block is stale");
}
#ifdef ENABLE_WALLET
@ -477,7 +478,7 @@ static bool ProcessBlockFound(CBlock* pblock)
// Process this block the same as if we had received it from another node
CValidationState state;
if (!ProcessNewBlock(state, NULL, pblock, true, NULL))
return error("ZcashMiner: ProcessNewBlock, block not accepted");
return error("HushMiner: ProcessNewBlock, block not accepted");
TrackMinedBlock(pblock->GetHash());
@ -490,9 +491,9 @@ void static BitcoinMiner(CWallet *pwallet)
void static BitcoinMiner()
#endif
{
LogPrintf("ZcashMiner started\n");
LogPrintf("HushMiner started\n");
SetThreadPriority(THREAD_PRIORITY_LOWEST);
RenameThread("zcash-miner");
RenameThread("hush-miner");
const CChainParams& chainparams = Params();
#ifdef ENABLE_WALLET
@ -553,17 +554,17 @@ void static BitcoinMiner()
if (!pblocktemplate.get())
{
if (GetArg("-mineraddress", "").empty()) {
LogPrintf("Error in ZcashMiner: 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 ZcashMiner: Invalid -mineraddress\n");
LogPrintf("Error in HushMiner: Invalid -mineraddress\n");
}
return;
}
CBlock *pblock = &pblocktemplate->block;
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
LogPrintf("Running ZcashMiner with %u transactions in block (%u bytes)\n", pblock->vtx.size(),
LogPrintf("Running HushMiner with %u transactions in block (%u bytes)\n", pblock->vtx.size(),
::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION));
//
@ -614,7 +615,7 @@ void static BitcoinMiner()
// Found a solution
SetThreadPriority(THREAD_PRIORITY_NORMAL);
LogPrintf("ZcashMiner:\n");
LogPrintf("HushMiner:\n");
LogPrintf("proof-of-work found \n hash: %s \ntarget: %s\n", pblock->GetHash().GetHex(), hashTarget.GetHex());
#ifdef ENABLE_WALLET
if (ProcessBlockFound(pblock, *pwallet, reservekey)) {
@ -716,14 +717,14 @@ void static BitcoinMiner()
{
miningTimer.stop();
c.disconnect();
LogPrintf("ZcashMiner terminated\n");
LogPrintf("HushMiner terminated\n");
throw;
}
catch (const std::runtime_error &e)
{
miningTimer.stop();
c.disconnect();
LogPrintf("ZcashMiner runtime error: %s\n", e.what());
LogPrintf("HushMiner runtime error: %s\n", e.what());
return;
}
miningTimer.stop();

8
src/rpcmining.cpp

@ -144,7 +144,7 @@ UniValue getgenerate(const UniValue& params, bool fHelp)
throw runtime_error(
"getgenerate\n"
"\nReturn if the server is set to generate coins or not. The default is false.\n"
"It is set with the command line argument -gen (or zcash.conf setting gen)\n"
"It is set with the command line argument -gen (or hush.conf setting gen)\n"
"It can also be set with the setgenerate call.\n"
"\nResult\n"
"true|false (boolean) If the server is set to generate coins or not\n"
@ -179,7 +179,7 @@ UniValue generate(const UniValue& params, bool fHelp)
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Wallet disabled and -mineraddress not set");
}
#else
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "zcashd compiled without wallet and -mineraddress not set");
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "hushd compiled without wallet and -mineraddress not set");
#endif
}
if (!Params().MineBlocksOnDemand())
@ -294,7 +294,7 @@ UniValue setgenerate(const UniValue& params, bool fHelp)
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Wallet disabled and -mineraddress not set");
}
#else
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "zcashd compiled without wallet and -mineraddress not set");
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "hushd compiled without wallet and -mineraddress not set");
#endif
}
if (Params().MineBlocksOnDemand())
@ -496,7 +496,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Wallet disabled and -mineraddress not set");
}
#else
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "zcashd compiled without wallet and -mineraddress not set");
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "hushd compiled without wallet and -mineraddress not set");
#endif
}

6
src/rpcserver.cpp

@ -245,10 +245,10 @@ UniValue stop(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"stop\n"
"\nStop Zcash server.");
"\nStop Hush server.");
// Shutdown will take long enough that the response should get back
StartShutdown();
return "Zcash server stopping";
return "Hush server stopping";
}
/**
@ -581,7 +581,7 @@ UniValue CRPCTable::execute(const std::string &strMethod, const UniValue &params
std::string HelpExampleCli(const std::string& methodname, const std::string& args)
{
return "> zcash-cli " + methodname + " " + args + "\n";
return "> hush-cli " + methodname + " " + args + "\n";
}
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)

2
src/sendalert.cpp

@ -27,7 +27,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

5
src/timedata.cpp

@ -1,4 +1,5 @@
// Copyright (c) 2014 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -57,7 +58,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
vTimeOffsets.input(nOffsetSample);
LogPrintf("Added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
// There is a known issue here (see issue #4521):
// There is a known issue here (see zcash issue #4521):
//
// - The structure vTimeOffsets contains up to 200 elements, after which
// any new element added to it will not increase its size, replacing the
@ -99,7 +100,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
if (!fMatch)
{
fDone = true;
string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Zcash will not work properly.");
string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Hush will not work properly.");
strMiscWarning = strMessage;
LogPrintf("*** %s\n", strMessage);
uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);

15
src/util.cpp

@ -424,7 +424,7 @@ static std::string FormatException(const std::exception* pex, const char* pszThr
char pszModule[MAX_PATH] = "";
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
#else
const char* pszModule = "Zcash";
const char* pszModule = "Hush";
#endif
if (pex)
return strprintf(
@ -445,10 +445,10 @@ void PrintExceptionContinue(const std::exception* pex, const char* pszThread)
boost::filesystem::path GetDefaultDataDir()
{
namespace fs = boost::filesystem;
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Zcash
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Zcash
// Mac: ~/Library/Application Support/Zcash
// Unix: ~/.zcash
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Hush
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Hush
// Mac: ~/Library/Application Support/Hush
// Unix: ~/.hush
#ifdef WIN32
// Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "Hush";
@ -595,7 +595,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
{
boost::filesystem::ifstream streamConfig(GetConfigFile());
if (!streamConfig.good())
throw missing_zcash_conf();
throw missing_hush_conf();
set<string> setOptions;
setOptions.insert("*");
@ -619,7 +619,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
#ifndef WIN32
boost::filesystem::path GetPidFile()
{
boost::filesystem::path pathPidFile(GetArg("-pid", "zcashd.pid"));
boost::filesystem::path pathPidFile(GetArg("-pid", "hushd.pid"));
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
return pathPidFile;
}
@ -901,6 +901,7 @@ std::string LicenseInfo()
return "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2015-%i The Zcash Developers"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2016-%i The Hush Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(_("This is experimental software.")) + "\n" +
"\n" +

4
src/util.h

@ -128,9 +128,9 @@ boost::filesystem::path GetConfigFile();
boost::filesystem::path GetPidFile();
void CreatePidFile(const boost::filesystem::path &path, pid_t pid);
#endif
class missing_zcash_conf : public std::runtime_error {
class missing_hush_conf : public std::runtime_error {
public:
missing_zcash_conf() : std::runtime_error("Missing zcash.conf") { }
missing_hush_conf() : std::runtime_error("Missing hush.conf") { }
};
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
#ifdef WIN32

21
src/wallet/rpcdump.cpp

@ -1,4 +1,5 @@
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -80,10 +81,10 @@ UniValue importprivkey(const UniValue& params, bool fHelp)
if (fHelp || params.size() < 1 || params.size() > 3)
throw runtime_error(
"importprivkey \"zcashprivkey\" ( \"label\" rescan )\n"
"importprivkey \"hushprivkey\" ( \"label\" rescan )\n"
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
"\nArguments:\n"
"1. \"zcashprivkey\" (string, required) The private key (see dumpprivkey)\n"
"1. \"hushprivkey\" (string, required) The private key (see dumpprivkey)\n"
"2. \"label\" (string, optional, default=\"\") An optional label\n"
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
"\nNote: This call can take minutes to complete if rescan is true.\n"
@ -181,7 +182,7 @@ UniValue importaddress(const UniValue& params, bool fHelp)
std::vector<unsigned char> data(ParseHex(params[0].get_str()));
script = CScript(data.begin(), data.end());
} else {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address or script");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Hush address or script");
}
string strLabel = "";
@ -297,7 +298,7 @@ UniValue importwallet_impl(const UniValue& params, bool fHelp, bool fImportZKeys
if (vstr.size() < 2)
continue;
// Let's see if the address is a valid Zcash spending key
// Let's see if the address is a valid Hush spending key
if (fImportZKeys) {
try {
CZCSpendingKey spendingkey(vstr[0]);
@ -391,7 +392,7 @@ UniValue dumpprivkey(const UniValue& params, bool fHelp)
"\nReveals the private key corresponding to 'hushaddress'.\n"
"Then the importprivkey can be used with this output\n"
"\nArguments:\n"
"1. \"hushaddress\" (string, required) The zcash address for the private key\n"
"1. \"hushaddress\" (string, required) The hush address for the private key\n"
"\nResult:\n"
"\"key\" (string) The private key\n"
"\nExamples:\n"
@ -407,7 +408,7 @@ UniValue dumpprivkey(const UniValue& params, bool fHelp)
string strAddress = params[0].get_str();
CBitcoinAddress address;
if (!address.SetString(strAddress))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid hush address");
CKeyID keyID;
if (!address.GetKeyID(keyID))
throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key");
@ -429,7 +430,7 @@ UniValue z_exportwallet(const UniValue& params, bool fHelp)
"z_exportwallet \"filename\"\n"
"\nExports all wallet keys, for taddr and zaddr, in a human-readable format.\n"
"\nArguments:\n"
"1. \"filename\" (string, required) The filename, saved in folder set by zcashd -exportdir option\n"
"1. \"filename\" (string, required) The filename, saved in folder set by hushd -exportdir option\n"
"\nResult:\n"
"\"path\" (string) The full path of the destination file\n"
"\nExamples:\n"
@ -450,7 +451,7 @@ UniValue dumpwallet(const UniValue& params, bool fHelp)
"dumpwallet \"filename\"\n"
"\nDumps taddr wallet keys in a human-readable format.\n"
"\nArguments:\n"
"1. \"filename\" (string, required) The filename, saved in folder set by zcashd -exportdir option\n"
"1. \"filename\" (string, required) The filename, saved in folder set by hushd -exportdir option\n"
"\nResult:\n"
"\"path\" (string) The full path of the destination file\n"
"\nExamples:\n"
@ -474,7 +475,7 @@ UniValue dumpwallet_impl(const UniValue& params, bool fHelp, bool fDumpZKeys)
throw JSONRPCError(RPC_INTERNAL_ERROR, e.what());
}
if (exportdir.empty()) {
throw JSONRPCError(RPC_WALLET_ERROR, "Cannot export wallet until the zcashd -exportdir option has been set");
throw JSONRPCError(RPC_WALLET_ERROR, "Cannot export wallet until the hushd -exportdir option has been set");
}
std::string unclean = params[0].get_str();
std::string clean = SanitizeFilename(unclean);
@ -502,7 +503,7 @@ UniValue dumpwallet_impl(const UniValue& params, bool fHelp, bool fDumpZKeys)
std::sort(vKeyBirth.begin(), vKeyBirth.end());
// produce output
file << strprintf("# Wallet dump created by Zcash %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
file << strprintf("# Wallet dump created by Hush %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime()));
file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString());
file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime()));

83
src/wallet/rpcwallet.cpp

@ -1,5 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -114,11 +115,11 @@ UniValue getnewaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"getnewaddress ( \"account\" )\n"
"\nReturns a new Zcash address for receiving payments.\n"
"\nReturns a new Hush address for receiving payments.\n"
"\nArguments:\n"
"1. \"account\" (string, optional) DEPRECATED. If provided, it MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"\"hushaddress\" (string) The new zcash address\n"
"\"hushaddress\" (string) The new Hush address\n"
"\nExamples:\n"
+ HelpExampleCli("getnewaddress", "")
+ HelpExampleRpc("getnewaddress", "")
@ -191,11 +192,11 @@ UniValue getaccountaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() != 1)
throw runtime_error(
"getaccountaddress \"account\"\n"
"\nDEPRECATED. Returns the current Zcash address for receiving payments to this account.\n"
"\nDEPRECATED. Returns the current Hush address for receiving payments to this account.\n"
"\nArguments:\n"
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"\"hushaddress\" (string) The account zcash address\n"
"\"hushaddress\" (string) The account hush address\n"
"\nExamples:\n"
+ HelpExampleCli("getaccountaddress", "")
+ HelpExampleCli("getaccountaddress", "\"\"")
@ -223,7 +224,7 @@ UniValue getrawchangeaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"getrawchangeaddress\n"
"\nReturns a new Zcash address, for receiving change.\n"
"\nReturns a new Hush address, for receiving change.\n"
"This is for use with raw transactions, NOT normal use.\n"
"\nResult:\n"
"\"address\" (string) The address\n"
@ -260,7 +261,7 @@ UniValue setaccount(const UniValue& params, bool fHelp)
"setaccount \"hushaddress\" \"account\"\n"
"\nDEPRECATED. Sets the account associated with the given address.\n"
"\nArguments:\n"
"1. \"hushaddress\" (string, required) The zcash address to be associated with an account.\n"
"1. \"hushaddress\" (string, required) The hush address to be associated with an account.\n"
"2. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nExamples:\n"
+ HelpExampleCli("setaccount", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"tabby\"")
@ -271,7 +272,7 @@ UniValue setaccount(const UniValue& params, bool fHelp)
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Hush address");
string strAccount;
if (params.size() > 1)
@ -306,7 +307,7 @@ UniValue getaccount(const UniValue& params, bool fHelp)
"getaccount \"hushaddress\"\n"
"\nDEPRECATED. Returns the account associated with the given address.\n"
"\nArguments:\n"
"1. \"hushaddress\" (string, required) The zcash address for account lookup.\n"
"1. \"hushaddress\" (string, required) The hush address for account lookup.\n"
"\nResult:\n"
"\"accountname\" (string) the account address\n"
"\nExamples:\n"
@ -318,7 +319,7 @@ UniValue getaccount(const UniValue& params, bool fHelp)
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Hush address");
string strAccount;
map<CTxDestination, CAddressBookData>::iterator mi = pwalletMain->mapAddressBook.find(address.Get());
@ -341,7 +342,7 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp)
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"[ (json array of string)\n"
" \"hushaddress\" (string) a zcash address associated with the given account\n"
" \"hushaddress\" (string) a hush address associated with the given account\n"
" ,...\n"
"]\n"
"\nExamples:\n"
@ -376,7 +377,7 @@ static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtr
if (nValue > curBalance)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
// Parse Zcash address
// Parse Hush address
CScript scriptPubKey = GetScriptForDestination(address);
// Create and send the transaction
@ -407,7 +408,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
+ HelpRequiringPassphrase() +
"\nArguments:\n"
"1. \"hushaddress\" (string, required) The zcash address to send to.\n"
"1. \"hushaddress\" (string, required) The hush address to send to.\n"
"2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n"
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
" This is not part of the transaction, just kept in your wallet.\n"
@ -415,7 +416,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
" to which you're sending the transaction. This is not part of the \n"
" transaction, just kept in your wallet.\n"
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
" The recipient will receive less zcash than you enter in the amount field.\n"
" The recipient will receive less hush than you enter in the amount field.\n"
"\nResult:\n"
"\"transactionid\" (string) The transaction id.\n"
"\nExamples:\n"
@ -429,7 +430,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Hush address");
// Amount
CAmount nAmount = AmountFromValue(params[1]);
@ -469,7 +470,7 @@ UniValue listaddressgroupings(const UniValue& params, bool fHelp)
"[\n"
" [\n"
" [\n"
" \"hushaddress\", (string) The zcash address\n"
" \"hushaddress\", (string) The hush address\n"
" amount, (numeric) The amount in btc\n"
" \"account\" (string, optional) The account (DEPRECATED)\n"
" ]\n"
@ -516,7 +517,7 @@ UniValue signmessage(const UniValue& params, bool fHelp)
"\nSign a message with the private key of an address"
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"hushaddress\" (string, required) The zcash address to use for the private key.\n"
"1. \"hushaddress\" (string, required) The hush address to use for the private key.\n"
"2. \"message\" (string, required) The message to create a signature of.\n"
"\nResult:\n"
"\"signature\" (string) The signature of the message encoded in base 64\n"
@ -571,7 +572,7 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
"getreceivedbyaddress \"hushaddress\" ( minconf )\n"
"\nReturns the total amount received by the given hushaddress in transactions with at least minconf confirmations.\n"
"\nArguments:\n"
"1. \"hushaddress\" (string, required) The zcash address for transactions.\n"
"1. \"hushaddress\" (string, required) The hush address for transactions.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"\nResult:\n"
"amount (numeric) The total amount in btc received at this address.\n"
@ -591,7 +592,7 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
// Bitcoin address
CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Hush address");
CScript scriptPubKey = GetScriptForDestination(address.Get());
if (!IsMine(*pwalletMain,scriptPubKey))
return (double)0.0;
@ -876,12 +877,12 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
if (fHelp || params.size() < 3 || params.size() > 6)
throw runtime_error(
"sendfrom \"fromaccount\" \"tohushaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a zcash address.\n"
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a hush address.\n"
"The amount is a real and is rounded to the nearest 0.00000001."
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"2. \"tohushaddress\" (string, required) The zcash address to send funds to.\n"
"2. \"tohushaddress\" (string, required) The hush address to send funds to.\n"
"3. amount (numeric, required) The amount in btc. (transaction fee is added on top).\n"
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
@ -905,7 +906,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
string strAccount = AccountFromValue(params[0]);
CBitcoinAddress address(params[1].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Hush address");
CAmount nAmount = AmountFromValue(params[2]);
if (nAmount <= 0)
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount for send");
@ -947,14 +948,14 @@ UniValue sendmany(const UniValue& params, bool fHelp)
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
" {\n"
" \"address\":amount (numeric) The zcash address is the key, the numeric amount in btc is the value\n"
" \"address\":amount (numeric) The hush address is the key, the numeric amount in btc is the value\n"
" ,...\n"
" }\n"
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
"4. \"comment\" (string, optional) A comment\n"
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
" The fee will be equally deducted from the amount of each selected address.\n"
" Those recipients will receive less zcashs than you enter in their corresponding amount field.\n"
" Those recipients will receive less hush than you enter in their corresponding amount field.\n"
" If no addresses are specified here, the sender pays the fee.\n"
" [\n"
" \"address\" (string) Subtract fee from this address\n"
@ -1000,7 +1001,7 @@ UniValue sendmany(const UniValue& params, bool fHelp)
{
CBitcoinAddress address(name_);
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Zcash address: ")+name_);
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Hush address: ")+name_);
if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+name_);
@ -1056,20 +1057,20 @@ UniValue addmultisigaddress(const UniValue& params, bool fHelp)
{
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
"Each key is a Zcash address or hex-encoded public key.\n"
"Each key is a Hush address or hex-encoded public key.\n"
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
"\nArguments:\n"
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
"2. \"keysobject\" (string, required) A json array of zcash addresses or hex-encoded public keys\n"
"2. \"keysobject\" (string, required) A json array of hush addresses or hex-encoded public keys\n"
" [\n"
" \"address\" (string) zcash address or hex-encoded public key\n"
" \"address\" (string) hush address or hex-encoded public key\n"
" ...,\n"
" ]\n"
"3. \"account\" (string, optional) DEPRECATED. If provided, MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"\"hushaddress\" (string) A zcash address associated with the keys.\n"
"\"hushaddress\" (string) A hush address associated with the keys.\n"
"\nExamples:\n"
"\nAdd a multisig address from 2 addresses\n"
@ -1416,7 +1417,7 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
" {\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
" It will be \"\" for the default account.\n"
" \"address\":\"hushaddress\", (string) The zcash address of the transaction. Not present for \n"
" \"address\":\"hushaddress\", (string) The hush address of the transaction. Not present for \n"
" move transactions (category = move).\n"
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
" transaction between accounts, and not associated with an address,\n"
@ -1616,7 +1617,7 @@ UniValue listsinceblock(const UniValue& params, bool fHelp)
"{\n"
" \"transactions\": [\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
" \"address\":\"hushaddress\", (string) The zcash address of the transaction. Not present for move transactions (category = move).\n"
" \"address\":\"hushaddress\", (string) The hush address of the transaction. Not present for move transactions (category = move).\n"
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
" \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves \n"
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
@ -1715,7 +1716,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
" \"details\" : [\n"
" {\n"
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
" \"address\" : \"hushaddress\", (string) The zcash address involved in the transaction\n"
" \"address\" : \"hushaddress\", (string) The hush address involved in the transaction\n"
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
" \"amount\" : x.xxx (numeric) The amount in btc\n"
" \"vout\" : n, (numeric) the vout value\n"
@ -1875,7 +1876,7 @@ UniValue walletpassphrase(const UniValue& params, bool fHelp)
throw runtime_error(
"walletpassphrase \"passphrase\" timeout\n"
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
"This is needed prior to performing transactions related to private keys such as sending zcash\n"
"This is needed prior to performing transactions related to private keys such as sending hush\n"
"\nArguments:\n"
"1. \"passphrase\" (string, required) The wallet passphrase\n"
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
@ -2040,7 +2041,7 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
"\nExamples:\n"
"\nEncrypt you wallet\n"
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
"\nNow set the passphrase to use the wallet, such as for signing or sending zcash\n"
"\nNow set the passphrase to use the wallet, such as for signing or sending hush\n"
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
"\nNow we can so something like sign\n"
+ HelpExampleCli("signmessage", "\"hushaddress\" \"test message\"") +
@ -2078,7 +2079,7 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
StartShutdown();
return "wallet encrypted; Zcash server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
return "wallet encrypted; Hush server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
}
UniValue lockunspent(const UniValue& params, bool fHelp)
@ -2091,7 +2092,7 @@ UniValue lockunspent(const UniValue& params, bool fHelp)
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
"\nUpdates list of temporarily unspendable outputs.\n"
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
"A locked transaction output will not be chosen by automatic coin selection, when spending zcash.\n"
"A locked transaction output will not be chosen by automatic coin selection, when spending hush.\n"
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
"Also see the listunspent call\n"
@ -2253,8 +2254,8 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
"\nResult:\n"
"{\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
" \"balance\": xxxxxxx, (numeric) the total confirmed zcash balance of the wallet\n"
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed zcash balance of the wallet\n"
" \"balance\": xxxxxxx, (numeric) the total confirmed hush balance of the wallet\n"
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed hush balance of the wallet\n"
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet\n"
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
@ -2324,9 +2325,9 @@ UniValue listunspent(const UniValue& params, bool fHelp)
"\nArguments:\n"
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
"3. \"addresses\" (string) A json array of zcash addresses to filter\n"
"3. \"addresses\" (string) A json array of Hush addresses to filter\n"
" [\n"
" \"address\" (string) zcash address\n"
" \"address\" (string) hush address\n"
" ,...\n"
" ]\n"
"\nResult\n"
@ -2334,7 +2335,7 @@ UniValue listunspent(const UniValue& params, bool fHelp)
" {\n"
" \"txid\" : \"txid\", (string) the transaction id \n"
" \"vout\" : n, (numeric) the vout value\n"
" \"address\" : \"address\", (string) the zcash address\n"
" \"address\" : \"address\", (string) the hush address\n"
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
" \"scriptPubKey\" : \"key\", (string) the script key\n"
" \"amount\" : x.xxx, (numeric) the transaction amount in btc\n"
@ -2366,7 +2367,7 @@ UniValue listunspent(const UniValue& params, bool fHelp)
const UniValue& input = inputs[idx];
CBitcoinAddress address(input.get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Zcash address: ")+input.get_str());
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Hush address: ")+input.get_str());
if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str());
setAddress.insert(address);

2
src/wallet/walletdb.cpp

@ -887,7 +887,7 @@ DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet, vector<CWalletTx>& vWtx)
void ThreadFlushWalletDB(const string& strFile)
{
// Make this thread recognisable as the wallet flushing thread
RenameThread("zcash-wallet");
RenameThread("hush-wallet");
static bool fOneThread;
if (fOneThread)

Loading…
Cancel
Save