diff --git a/.gitignore b/.gitignore index 2e216c844a65..693e30eaba66 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ libtool src/config/pivx-config.h src/config/pivx-config.h.in src/config/stamp-h1 +src/obj share/setup.nsi share/qt/Info.plist contrib/devtools/split-debug.sh diff --git a/build-aux/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch b/build-aux/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch index 755604057a67..15aac8ccc34b 100644 --- a/build-aux/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch +++ b/build-aux/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch @@ -1,25 +1,25 @@ -From ec230421e7107448ca9ac2421eb702924e12a879 Mon Sep 17 00:00:00 2001 -From: observerdev -Date: Thu, 11 Apr 2019 00:12:00 +0200 -Subject: [PATCH] fix-use-snap-instead--of-dirty +From 1110d61bd21b505fcea41bc3869c4dad1450b27e Mon Sep 17 00:00:00 2001 +From: Fuzzbawls +Date: Fri, 10 Sep 2021 01:46:16 -0700 +Subject: [Patch] Fix genbuild.sh for nightly snap builds +Use "snap" suffix instead of "dirty" --- share/genbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/genbuild.sh b/share/genbuild.sh -index 519cc6e..de56b8d 100755 +index 38c9ba176c..4088168c0b 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh -@@ -37,7 +37,7 @@ if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$( - +@@ -36,7 +36,7 @@ if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$( + # otherwise generate suffix from git, i.e. string like "59887e8-dirty" SUFFIX=$(git rev-parse --short HEAD) - git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" + git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-snap" - - # get a string like "2012-04-10 16:27:19 +0200" - LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")" --- -2.17.1 + fi + if [ -n "$DESC" ]; then +-- +2.17.1 diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index f96d4bf5c9e7..90b754e27d66 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -140,6 +140,7 @@ script: | export PATH=${WRAP_DIR}:${PATH} # Create the release tarball using (arbitrarily) the first host + git update-index --assume-unchanged src/chiabls/contrib/relic/include/relic_conf.h.in ./autogen.sh CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ make dist diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 65513aef9964..6b42d2a11bed 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -103,6 +103,7 @@ script: | export PATH=${WRAP_DIR}:${PATH} # Create the release tarball using (arbitrarily) the first host + git update-index --assume-unchanged src/chiabls/contrib/relic/include/relic_conf.h.in ./autogen.sh CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ make dist diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index d2fd322adf2c..a955af23e95e 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -110,6 +110,7 @@ script: | export PATH=${WRAP_DIR}:${PATH} # Create the release tarball using (arbitrarily) the first host + git update-index --assume-unchanged src/chiabls/contrib/relic/include/relic_conf.h.in ./autogen.sh CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ make dist diff --git a/doc/man/pivx-cli.1 b/doc/man/pivx-cli.1 index 778553f0927a..a8c8d8d456b1 100644 --- a/doc/man/pivx-cli.1 +++ b/doc/man/pivx-cli.1 @@ -1,17 +1,21 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3. -.TH PIVX-CLI "1" "August 2021" "pivx-cli v5.3.0.0" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH PIVX-CLI "1" "August 2021" "pivx-cli v5.2.99.0" "User Commands" .SH NAME -pivx-cli \- manual page for pivx-cli v5.3.0.0 +pivx-cli \- manual page for pivx-cli v5.2.99.0 +.SH SYNOPSIS +.B pivx-cli +[\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] \fI\,Send command to PIVX Core\/\fR +.br +.B pivx-cli +[\fI\,options\/\fR] \fI\,-named \/\fR[\fI\,name=value\/\fR]... \fI\,Send command to PIVX Core (with named arguments)\/\fR +.br +.B pivx-cli +[\fI\,options\/\fR] \fI\,help List commands\/\fR +.br +.B pivx-cli +[\fI\,options\/\fR] \fI\,help Get help for a command\/\fR .SH DESCRIPTION -PIVX Core RPC client version v5.3.0.0\-436e2793b\-dirty -.SS "Usage:" -.TP -pivx\-cli [options] [params] -Send command to PIVX Core -.IP -pivx\-cli [options] \fB\-named\fR [name=value] ... Send command to PIVX Core (with named arguments) -pivx\-cli [options] help List commands -pivx\-cli [options] help Get help for a command +PIVX Core RPC client version v5.2.99.0\-dirty .SH OPTIONS .HP \-? diff --git a/doc/man/pivx-qt.1 b/doc/man/pivx-qt.1 index cbdf25873e77..a5a5f53289e1 100644 --- a/doc/man/pivx-qt.1 +++ b/doc/man/pivx-qt.1 @@ -1,12 +1,12 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3. -.TH PIVX-QT "1" "August 2021" "pivx-qt v5.3.0.0" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH PIVX-QT "1" "August 2021" "pivx-qt v5.2.99.0" "User Commands" .SH NAME -pivx-qt \- manual page for pivx-qt v5.3.0.0 +pivx-qt \- manual page for pivx-qt v5.2.99.0 +.SH SYNOPSIS +.B pivx-qt +[\fI\,command-line options\/\fR] .SH DESCRIPTION -PIVX Core version v5.3.0.0\-436e2793b\-dirty (64\-bit) -Usage: -.IP -pivx\-qt [command\-line options] +PIVX Core version v5.2.99.0\-dirty (64\-bit) .SH OPTIONS .HP \-? @@ -50,8 +50,7 @@ Specify data directory .HP \fB\-paramsdir=\fR .IP -Specify zk params directory (default: \fI\,/Users/furszy/Library/Application\/\fP -Support/PIVXParams) +Specify zk params directory (default: /home/fuzzbawls/.pivx\-params) .HP \fB\-debuglogfile=\fR .IP @@ -93,7 +92,7 @@ Whether to save the mempool on shutdown and load on restart (default: 1) .HP \fB\-par=\fR .IP -Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = +Set the number of script verification threads (\fB\-16\fR to 16, 0 = auto, <0 = leave that many cores free, default: 0) .HP \fB\-pid=\fR @@ -251,6 +250,10 @@ Tor control port password (default: empty) .IP Use UPnP to map the listening port (default: 0) .HP +\fB\-natpmp\fR +.IP +Use NAT\-PMP to map the listening port (default: 0) +.HP \fB\-whitebind=\fR .IP Bind to given address and whitelist peers connecting to it. Use @@ -337,8 +340,8 @@ by TxID) \fB\-zapwallettxes=\fR .IP Delete all wallet transactions and only recover those parts of the -blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. -payment request information, 2 = drop tx meta data) +blockchain through \fB\-rescan\fR on startup(1 = keep tx meta data e.g. payment +request information, 2 = drop tx meta data) .PP Mining/Staking options: .HP @@ -397,7 +400,7 @@ Append comment to the user agent string .IP Output debugging information (default: 0, supplying is optional). If is not supplied, output all debugging -information. can be: net, tor, mempool, http, bench, zmq, db, +information. can be: net, tor, mempool, http, bench, zmq, db, rpc, estimatefee, addrman, selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent, coindb, qt, leveldb, staking, masternode, mnbudget, zero, mnping, sapling, sporks. diff --git a/doc/man/pivx-tx.1 b/doc/man/pivx-tx.1 index 5396f49e257d..b40b0b63bd40 100644 --- a/doc/man/pivx-tx.1 +++ b/doc/man/pivx-tx.1 @@ -1,16 +1,15 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3. -.TH PIVX-TX "1" "August 2021" "pivx-tx v5.3.0.0" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH PIVX-TX "1" "August 2021" "pivx-tx v5.2.99.0" "User Commands" .SH NAME -pivx-tx \- manual page for pivx-tx v5.3.0.0 +pivx-tx \- manual page for pivx-tx v5.2.99.0 +.SH SYNOPSIS +.B pivx-tx +[\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded pivx transaction\/\fR +.br +.B pivx-tx +[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded pivx transaction\/\fR .SH DESCRIPTION -Pivx Core pivx\-tx utility version v5.3.0.0\-436e2793b\-dirty -.SS "Usage:" -.TP -pivx\-tx [options] [commands] -Update hex\-encoded pivx transaction -.TP -pivx\-tx [options] \fB\-create\fR [commands] -Create hex\-encoded pivx transaction +PIVX Core pivx\-tx utility version v5.2.99.0\-dirty .SH OPTIONS .HP \-? diff --git a/doc/man/pivxd.1 b/doc/man/pivxd.1 index 345baf925919..712a52490d93 100644 --- a/doc/man/pivxd.1 +++ b/doc/man/pivxd.1 @@ -1,13 +1,12 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3. -.TH PIVXD "1" "August 2021" "pivxd v5.3.0.0" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH PIVXD "1" "August 2021" "pivxd v5.2.99.0" "User Commands" .SH NAME -pivxd \- manual page for pivxd v5.3.0.0 +pivxd \- manual page for pivxd v5.2.99.0 +.SH SYNOPSIS +.B pivxd +[\fI\,options\/\fR] \fI\,Start PIVX Core Daemon\/\fR .SH DESCRIPTION -Pivx Core Daemon version v5.3.0.0\-436e2793b\-dirty -.SS "Usage:" -.TP -pivxd [options] -Start Pivx Core Daemon +PIVX Core Daemon version v5.2.99.0\-dirty .SH OPTIONS .HP \-? @@ -55,8 +54,7 @@ Specify data directory .HP \fB\-paramsdir=\fR .IP -Specify zk params directory (default: \fI\,/Users/furszy/Library/Application\/\fP -Support/PIVXParams) +Specify zk params directory (default: /home/fuzzbawls/.pivx\-params) .HP \fB\-debuglogfile=\fR .IP @@ -98,7 +96,7 @@ Whether to save the mempool on shutdown and load on restart (default: 1) .HP \fB\-par=\fR .IP -Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = +Set the number of script verification threads (\fB\-16\fR to 16, 0 = auto, <0 = leave that many cores free, default: 0) .HP \fB\-pid=\fR @@ -256,6 +254,10 @@ Tor control port password (default: empty) .IP Use UPnP to map the listening port (default: 0) .HP +\fB\-natpmp\fR +.IP +Use NAT\-PMP to map the listening port (default: 0) +.HP \fB\-whitebind=\fR .IP Bind to given address and whitelist peers connecting to it. Use @@ -342,8 +344,8 @@ by TxID) \fB\-zapwallettxes=\fR .IP Delete all wallet transactions and only recover those parts of the -blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. -payment request information, 2 = drop tx meta data) +blockchain through \fB\-rescan\fR on startup(1 = keep tx meta data e.g. payment +request information, 2 = drop tx meta data) .PP Mining/Staking options: .HP @@ -398,7 +400,7 @@ Append comment to the user agent string .IP Output debugging information (default: 0, supplying is optional). If is not supplied, output all debugging -information. can be: net, tor, mempool, http, bench, zmq, db, +information. can be: net, tor, mempool, http, bench, zmq, db, rpc, estimatefee, addrman, selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent, coindb, qt, leveldb, staking, masternode, mnbudget, zero, mnping, sapling, sporks. diff --git a/share/genbuild.sh b/share/genbuild.sh index 519cc6e8f13f..38c9ba176cf8 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -24,7 +24,6 @@ git_check_in_repo() { DESC="" SUFFIX="" -LAST_COMMIT_DATE="" if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] && git_check_in_repo share/genbuild.sh; then # clean 'dirty' status of touched files that haven't been modified git diff >/dev/null 2>/dev/null @@ -38,9 +37,6 @@ if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$( # otherwise generate suffix from git, i.e. string like "59887e8-dirty" SUFFIX=$(git rev-parse --short HEAD) git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" - - # get a string like "2012-04-10 16:27:19 +0200" - LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")" fi if [ -n "$DESC" ]; then @@ -54,7 +50,4 @@ fi # only update build.h if necessary if [ "$INFO" != "$NEWINFO" ]; then echo "$NEWINFO" >"$FILE" - if [ -n "$LAST_COMMIT_DATE" ]; then - echo "#define BUILD_DATE \"$LAST_COMMIT_DATE\"" >> "$FILE" - fi fi diff --git a/share/qt/Info.plist.in b/share/qt/Info.plist.in index 5d124ee26b67..099a540a4f9d 100644 --- a/share/qt/Info.plist.in +++ b/share/qt/Info.plist.in @@ -17,7 +17,7 @@ APPL CFBundleGetInfoString - @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@.@CLIENT_VERSION_BUILD@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin Core developers, 2014-@COPYRIGHT_YEAR@ The Dash Core developers, 2015-@COPYRIGHT_YEAR@ The PIVX Core developers + @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@.@CLIENT_VERSION_BUILD@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin Core developers, 2014-@COPYRIGHT_YEAR@ The Dash Core developers, 2015-@COPYRIGHT_YEAR@ The @PACKAGE_NAME@ developers CFBundleShortVersionString @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@ diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 29a14521b4fb..1128eec933e6 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -659,7 +659,7 @@ SECONDARY: $(QT_QM) $(srcdir)/qt/pivxstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_zmq_a_SOURCES) $(libbitcoin_util_a_SOURCES) @test -n $(XGETTEXT) || echo "xgettext is required for updating translations" - $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" $(PYTHON) ../share/qt/extract_strings_qt.py $^ + $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) $(PYTHON) ../share/qt/extract_strings_qt.py $^ translate: $(srcdir)/qt/pivxstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) qt/pivx.cpp $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) @test -n $(LUPDATE) || echo "lupdate is required for updating translations" diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 38afea161f8f..cf00a42086a8 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -93,6 +93,8 @@ static Checkpoints::MapCheckpoints mapCheckpoints = { {2356049, uint256S("62e80d8e193bca84655fb78893b20f54a79f2d71124c4ea37b7ef51a0d5451c4")}, //!< Network split here {2365700, uint256S("b5d0beead57735539abc2db2b0b08cd65db3e5928efd3c3bf3182d5bf013f36c")}, //!< PIVX v4.1.1 enforced {2678402, uint256S("580a26ff0a45177a7a6f387f009c5b26140ea48b4790a857d9a796f8b3c25899")}, //!< Network split here + {3014000, uint256S("78ad99b7225f73c42238bd7ca841ff700542b92bba75a0ef2ed351caa560f87f")}, //!< PIVX v5.3.0 enforced + {3024000, uint256S("be4bc75afcfb9136924810f7483b2695089a366cc4ee27fd6dc3ecd5396e1f0f")}, //!< Superblock }; static const Checkpoints::CCheckpointData data = { diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 88b6cff91523..8926a3dbe4fd 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -17,8 +17,8 @@ const std::string CBaseChainParams::REGTEST = "regtest"; void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp) { - strUsage += HelpMessageGroup(_("Chain selection options:")); - strUsage += HelpMessageOpt("-testnet", _("Use the test chain")); + strUsage += HelpMessageGroup("Chain selection options:"); + strUsage += HelpMessageOpt("-testnet", "Use the test chain"); if (debugHelp) { strUsage += HelpMessageOpt("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly. " "This is intended for regression testing tools and app development."); diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 1ae69828d06a..0c5c40e60f48 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -13,7 +13,7 @@ * for both pivxd and pivx-qt, to make it harder for attackers to * target servers or GUI users specifically. */ -const std::string CLIENT_NAME("PIVX Core"); +const std::string CLIENT_NAME(PACKAGE_NAME); /** * Client version number @@ -67,16 +67,7 @@ const std::string CLIENT_NAME("PIVX Core"); #endif #endif -#ifndef BUILD_DATE -#ifdef GIT_COMMIT_DATE -#define BUILD_DATE GIT_COMMIT_DATE -#else -#define BUILD_DATE __DATE__ ", " __TIME__ -#endif -#endif - const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX); -const std::string CLIENT_DATE(BUILD_DATE); static std::string FormatVersion(int nVersion) { diff --git a/src/clientversion.h b/src/clientversion.h index d797f844e025..0a83eaabf16a 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -23,7 +23,7 @@ #define DO_STRINGIZE(X) #X //! Copyright string used in Windows .rc files -#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers, 2015-" STRINGIZE(COPYRIGHT_YEAR) " The PIVX Core Developers" +#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers, 2015-" STRINGIZE(COPYRIGHT_YEAR) " The " PACKAGE_NAME " Developers" /** * pivxd-res.rc includes this file, but it cannot cope with real c++ code. @@ -44,7 +44,6 @@ static const int CLIENT_VERSION = extern const std::string CLIENT_NAME; extern const std::string CLIENT_BUILD; -extern const std::string CLIENT_DATE; std::string FormatFullVersion(); diff --git a/src/init.cpp b/src/init.cpp index 67daf9dc7b3e..c71c3b498d62 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -432,190 +432,190 @@ std::string HelpMessage(HelpMessageMode mode) const bool showDebug = gArgs.GetBoolArg("-help-debug", false); // When adding new options to the categories, please keep and ensure alphabetical ordering. - std::string strUsage = HelpMessageGroup(_("Options:")); - strUsage += HelpMessageOpt("-?", _("This help message")); - strUsage += HelpMessageOpt("-version", _("Print version and exit")); - strUsage += HelpMessageOpt("-alertnotify=", _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)")); - strUsage += HelpMessageOpt("-blocksdir=", _("Specify directory to hold blocks subdirectory for *.dat files (default: )")); - strUsage += HelpMessageOpt("-blocknotify=", _("Execute command when the best block changes (%s in cmd is replaced by block hash)")); - strUsage += HelpMessageOpt("-checkblocks=", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), DEFAULT_CHECKBLOCKS)); + std::string strUsage = HelpMessageGroup("Options:"); + strUsage += HelpMessageOpt("-?", "This help message"); + strUsage += HelpMessageOpt("-version", "Print version and exit"); + strUsage += HelpMessageOpt("-alertnotify=", "Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)"); + strUsage += HelpMessageOpt("-blocksdir=", "Specify directory to hold blocks subdirectory for *.dat files (default: )"); + strUsage += HelpMessageOpt("-blocknotify=", "Execute command when the best block changes (%s in cmd is replaced by block hash)"); + strUsage += HelpMessageOpt("-checkblocks=", strprintf("How many blocks to check at startup (default: %u, 0 = all)", DEFAULT_CHECKBLOCKS)); strUsage += HelpMessageOpt("-checklevel=", strprintf("How thorough the block verification of -checkblocks is (0-4, default: %u)", DEFAULT_CHECKLEVEL)); - strUsage += HelpMessageOpt("-conf=", strprintf(_("Specify configuration file (default: %s)"), PIVX_CONF_FILENAME)); + strUsage += HelpMessageOpt("-conf=", strprintf("Specify configuration file (default: %s)", PIVX_CONF_FILENAME)); if (mode == HMM_BITCOIND) { #if !defined(WIN32) - strUsage += HelpMessageOpt("-daemon", _("Run in the background as a daemon and accept commands")); + strUsage += HelpMessageOpt("-daemon", "Run in the background as a daemon and accept commands"); #endif } - strUsage += HelpMessageOpt("-datadir=", _("Specify data directory")); + strUsage += HelpMessageOpt("-datadir=", "Specify data directory"); if (showDebug) { strUsage += HelpMessageOpt("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize)); } - strUsage += HelpMessageOpt("-paramsdir=", strprintf(_("Specify zk params directory (default: %s)"), ZC_GetParamsDir().string())); - strUsage += HelpMessageOpt("-debuglogfile=", strprintf(_("Specify location of debug log file: this can be an absolute path or a path relative to the data directory (default: %s)"), DEFAULT_DEBUGLOGFILE)); - strUsage += HelpMessageOpt("-disablesystemnotifications", strprintf(_("Disable OS notifications for incoming transactions (default: %u)"), 0)); - strUsage += HelpMessageOpt("-dbcache=", strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache)); - strUsage += HelpMessageOpt("-loadblock=", _("Imports blocks from external blk000??.dat file") + " " + _("on startup")); - strUsage += HelpMessageOpt("-maxreorg=", strprintf(_("Set the Maximum reorg depth (default: %u)"), DEFAULT_MAX_REORG_DEPTH)); - strUsage += HelpMessageOpt("-maxorphantx=", strprintf(_("Keep at most unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS)); - strUsage += HelpMessageOpt("-maxmempool=", strprintf(_("Keep the transaction memory pool below megabytes (default: %u)"), DEFAULT_MAX_MEMPOOL_SIZE)); - strUsage += HelpMessageOpt("-mempoolexpiry=", strprintf(_("Do not keep transactions in the mempool longer than hours (default: %u)"), DEFAULT_MEMPOOL_EXPIRY)); - strUsage += HelpMessageOpt("-persistmempool", strprintf(_("Whether to save the mempool on shutdown and load on restart (default: %u)"), DEFAULT_PERSIST_MEMPOOL)); - strUsage += HelpMessageOpt("-par=", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS)); + strUsage += HelpMessageOpt("-paramsdir=", strprintf("Specify zk params directory (default: %s)", ZC_GetParamsDir().string())); + strUsage += HelpMessageOpt("-debuglogfile=", strprintf("Specify location of debug log file: this can be an absolute path or a path relative to the data directory (default: %s)", DEFAULT_DEBUGLOGFILE)); + strUsage += HelpMessageOpt("-disablesystemnotifications", strprintf("Disable OS notifications for incoming transactions (default: %u)", 0)); + strUsage += HelpMessageOpt("-dbcache=", strprintf("Set database cache size in megabytes (%d to %d, default: %d)", nMinDbCache, nMaxDbCache, nDefaultDbCache)); + strUsage += HelpMessageOpt("-loadblock=", "Imports blocks from external blk000??.dat file on startup"); + strUsage += HelpMessageOpt("-maxreorg=", strprintf("Set the Maximum reorg depth (default: %u)", DEFAULT_MAX_REORG_DEPTH)); + strUsage += HelpMessageOpt("-maxorphantx=", strprintf("Keep at most unconnectable transactions in memory (default: %u)", DEFAULT_MAX_ORPHAN_TRANSACTIONS)); + strUsage += HelpMessageOpt("-maxmempool=", strprintf("Keep the transaction memory pool below megabytes (default: %u)", DEFAULT_MAX_MEMPOOL_SIZE)); + strUsage += HelpMessageOpt("-mempoolexpiry=", strprintf("Do not keep transactions in the mempool longer than hours (default: %u)", DEFAULT_MEMPOOL_EXPIRY)); + strUsage += HelpMessageOpt("-persistmempool", strprintf("Whether to save the mempool on shutdown and load on restart (default: %u)", DEFAULT_PERSIST_MEMPOOL)); + strUsage += HelpMessageOpt("-par=", strprintf("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)", -GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS)); #ifndef WIN32 - strUsage += HelpMessageOpt("-pid=", strprintf(_("Specify pid file (default: %s)"), PIVX_PID_FILENAME)); + strUsage += HelpMessageOpt("-pid=", strprintf("Specify pid file (default: %s)", PIVX_PID_FILENAME)); #endif - strUsage += HelpMessageOpt("-reindex-chainstate", _("Rebuild chain state from the currently indexed blocks")); - strUsage += HelpMessageOpt("-reindex", _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup")); - strUsage += HelpMessageOpt("-resync", _("Delete blockchain folders and resync from scratch") + " " + _("on startup")); + strUsage += HelpMessageOpt("-reindex-chainstate", "Rebuild chain state from the currently indexed blocks"); + strUsage += HelpMessageOpt("-reindex", "Rebuild block chain index from current blk000??.dat files on startup"); + strUsage += HelpMessageOpt("-resync", "Delete blockchain folders and resync from scratch on startup"); #if !defined(WIN32) - strUsage += HelpMessageOpt("-sysperms", _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)")); + strUsage += HelpMessageOpt("-sysperms", "Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)"); #endif - strUsage += HelpMessageOpt("-txindex", strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"), DEFAULT_TXINDEX)); - strUsage += HelpMessageOpt("-forcestart", _("Attempt to force blockchain corruption recovery") + " " + _("on startup")); + strUsage += HelpMessageOpt("-txindex", strprintf("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)", DEFAULT_TXINDEX)); + strUsage += HelpMessageOpt("-forcestart", "Attempt to force blockchain corruption recovery on startup"); - strUsage += HelpMessageGroup(_("Connection options:")); - strUsage += HelpMessageOpt("-addnode=", _("Add a node to connect to and attempt to keep the connection open")); + strUsage += HelpMessageGroup("Connection options:"); + strUsage += HelpMessageOpt("-addnode=", "Add a node to connect to and attempt to keep the connection open"); strUsage += HelpMessageOpt("-asmap=", strprintf("Specify asn mapping used for bucketing of the peers (default: %s). Relative paths will be prefixed by the net-specific datadir location.", DEFAULT_ASMAP_FILENAME)); - strUsage += HelpMessageOpt("-banscore=", strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), DEFAULT_BANSCORE_THRESHOLD)); - strUsage += HelpMessageOpt("-bantime=", strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), DEFAULT_MISBEHAVING_BANTIME)); - strUsage += HelpMessageOpt("-bind=", _("Bind to given address and always listen on it. Use [host]:port notation for IPv6")); - strUsage += HelpMessageOpt("-connect=", _("Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections")); - strUsage += HelpMessageOpt("-discover", _("Discover own IP address (default: 1 when listening and no -externalip)")); - strUsage += HelpMessageOpt("-dns", strprintf(_("Allow DNS lookups for -addnode, -seednode and -connect (default: %u)"), DEFAULT_NAME_LOOKUP)); - strUsage += HelpMessageOpt("-dnsseed", _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)")); - strUsage += HelpMessageOpt("-externalip=", _("Specify your own public address")); - strUsage += HelpMessageOpt("-forcednsseed", strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), DEFAULT_FORCEDNSSEED)); - strUsage += HelpMessageOpt("-listen", strprintf(_("Accept connections from outside (default: %u if no -proxy or -connect/-noconnect)"), DEFAULT_LISTEN)); - strUsage += HelpMessageOpt("-listenonion", strprintf(_("Automatically create Tor hidden service (default: %d)"), DEFAULT_LISTEN_ONION)); - strUsage += HelpMessageOpt("-maxconnections=", strprintf(_("Maintain at most connections to peers (default: %u)"), DEFAULT_MAX_PEER_CONNECTIONS)); - strUsage += HelpMessageOpt("-maxreceivebuffer=", strprintf(_("Maximum per-connection receive buffer, *1000 bytes (default: %u)"), DEFAULT_MAXRECEIVEBUFFER)); - strUsage += HelpMessageOpt("-maxsendbuffer=", strprintf(_("Maximum per-connection send buffer, *1000 bytes (default: %u)"), DEFAULT_MAXSENDBUFFER)); - strUsage += HelpMessageOpt("-onion=", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy")); - strUsage += HelpMessageOpt("-onlynet=", _("Only connect to nodes in network (ipv4, ipv6 or onion)")); - strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), DEFAULT_PERMIT_BAREMULTISIG)); - strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with bloom filters (default: %u)"), DEFAULT_PEERBLOOMFILTERS)); - strUsage += HelpMessageOpt("-port=", strprintf(_("Listen for connections on (default: %u or testnet: %u)"), defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort())); - strUsage += HelpMessageOpt("-proxy=", _("Connect through SOCKS5 proxy")); - strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), DEFAULT_PROXYRANDOMIZE)); - strUsage += HelpMessageOpt("-seednode=", _("Connect to a node to retrieve peer addresses, and disconnect")); - strUsage += HelpMessageOpt("-timeout=", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT)); - strUsage += HelpMessageOpt("-torcontrol=:", strprintf(_("Tor control port to use if onion listening enabled (default: %s)"), DEFAULT_TOR_CONTROL)); - strUsage += HelpMessageOpt("-torpassword=", _("Tor control port password (default: empty)")); - strUsage += HelpMessageOpt("-upnp", strprintf(_("Use UPnP to map the listening port (default: %u)"), DEFAULT_UPNP)); + strUsage += HelpMessageOpt("-banscore=", strprintf("Threshold for disconnecting misbehaving peers (default: %u)", DEFAULT_BANSCORE_THRESHOLD)); + strUsage += HelpMessageOpt("-bantime=", strprintf("Number of seconds to keep misbehaving peers from reconnecting (default: %u)", DEFAULT_MISBEHAVING_BANTIME)); + strUsage += HelpMessageOpt("-bind=", "Bind to given address and always listen on it. Use [host]:port notation for IPv6"); + strUsage += HelpMessageOpt("-connect=", "Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections"); + strUsage += HelpMessageOpt("-discover", "Discover own IP address (default: 1 when listening and no -externalip)"); + strUsage += HelpMessageOpt("-dns", strprintf("Allow DNS lookups for -addnode, -seednode and -connect (default: %u)", DEFAULT_NAME_LOOKUP)); + strUsage += HelpMessageOpt("-dnsseed", "Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)"); + strUsage += HelpMessageOpt("-externalip=", "Specify your own public address"); + strUsage += HelpMessageOpt("-forcednsseed", strprintf("Always query for peer addresses via DNS lookup (default: %u)", DEFAULT_FORCEDNSSEED)); + strUsage += HelpMessageOpt("-listen", strprintf("Accept connections from outside (default: %u if no -proxy or -connect/-noconnect)", DEFAULT_LISTEN)); + strUsage += HelpMessageOpt("-listenonion", strprintf("Automatically create Tor hidden service (default: %d)", DEFAULT_LISTEN_ONION)); + strUsage += HelpMessageOpt("-maxconnections=", strprintf("Maintain at most connections to peers (default: %u)", DEFAULT_MAX_PEER_CONNECTIONS)); + strUsage += HelpMessageOpt("-maxreceivebuffer=", strprintf("Maximum per-connection receive buffer, *1000 bytes (default: %u)", DEFAULT_MAXRECEIVEBUFFER)); + strUsage += HelpMessageOpt("-maxsendbuffer=", strprintf("Maximum per-connection send buffer, *1000 bytes (default: %u)", DEFAULT_MAXSENDBUFFER)); + strUsage += HelpMessageOpt("-onion=", strprintf("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)", "-proxy")); + strUsage += HelpMessageOpt("-onlynet=", "Only connect to nodes in network (ipv4, ipv6 or onion)"); + strUsage += HelpMessageOpt("-permitbaremultisig", strprintf("Relay non-P2SH multisig (default: %u)", DEFAULT_PERMIT_BAREMULTISIG)); + strUsage += HelpMessageOpt("-peerbloomfilters", strprintf("Support filtering of blocks and transaction with bloom filters (default: %u)", DEFAULT_PEERBLOOMFILTERS)); + strUsage += HelpMessageOpt("-port=", strprintf("Listen for connections on (default: %u or testnet: %u)", defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort())); + strUsage += HelpMessageOpt("-proxy=", "Connect through SOCKS5 proxy"); + strUsage += HelpMessageOpt("-proxyrandomize", strprintf("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)", DEFAULT_PROXYRANDOMIZE)); + strUsage += HelpMessageOpt("-seednode=", "Connect to a node to retrieve peer addresses, and disconnect"); + strUsage += HelpMessageOpt("-timeout=", strprintf("Specify connection timeout in milliseconds (minimum: 1, default: %d)", DEFAULT_CONNECT_TIMEOUT)); + strUsage += HelpMessageOpt("-torcontrol=:", strprintf("Tor control port to use if onion listening enabled (default: %s)", DEFAULT_TOR_CONTROL)); + strUsage += HelpMessageOpt("-torpassword=", "Tor control port password (default: empty)"); + strUsage += HelpMessageOpt("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", DEFAULT_UPNP)); #ifdef USE_NATPMP strUsage += HelpMessageOpt("-natpmp", strprintf("Use NAT-PMP to map the listening port (default: %s)", DEFAULT_NATPMP ? "1 when listening and no -proxy" : "0")); #endif // USE_NATPMP - strUsage += HelpMessageOpt("-whitebind=", _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6")); - strUsage += HelpMessageOpt("-whitelist=", _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") + - " " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway")); + strUsage += HelpMessageOpt("-whitebind=", "Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6"); + strUsage += HelpMessageOpt("-whitelist=", "Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times." + " Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway"); #if ENABLE_WALLET strUsage += GetWalletHelpString(showDebug); #endif if (mode == HMM_BITCOIN_QT) { - strUsage += HelpMessageOpt("-windowtitle=", _("Wallet window title")); + strUsage += HelpMessageOpt("-windowtitle=", "Wallet window title"); } #if ENABLE_ZMQ - strUsage += HelpMessageGroup(_("ZeroMQ notification options:")); - strUsage += HelpMessageOpt("-zmqpubhashblock=
", _("Enable publish hash block in
")); - strUsage += HelpMessageOpt("-zmqpubhashtx=
", _("Enable publish hash transaction in
")); - strUsage += HelpMessageOpt("-zmqpubrawblock=
", _("Enable publish raw block in
")); - strUsage += HelpMessageOpt("-zmqpubrawtx=
", _("Enable publish raw transaction in
")); + strUsage += HelpMessageGroup("ZeroMQ notification options:"); + strUsage += HelpMessageOpt("-zmqpubhashblock=
", "Enable publish hash block in
"); + strUsage += HelpMessageOpt("-zmqpubhashtx=
", "Enable publish hash transaction in
"); + strUsage += HelpMessageOpt("-zmqpubrawblock=
", "Enable publish raw block in
"); + strUsage += HelpMessageOpt("-zmqpubrawtx=
", "Enable publish raw transaction in
"); #endif - strUsage += HelpMessageGroup(_("Debugging/Testing options:")); - strUsage += HelpMessageOpt("-uacomment=", _("Append comment to the user agent string")); + strUsage += HelpMessageGroup("Debugging/Testing options:"); + strUsage += HelpMessageOpt("-uacomment=", "Append comment to the user agent string"); if (showDebug) { strUsage += HelpMessageOpt("-checkblockindex", strprintf("Do a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive and mapBlocksUnlinked occasionally. Also sets -checkmempool (default: %u)", defaultChainParams->DefaultConsistencyChecks())); strUsage += HelpMessageOpt("-checkmempool=", strprintf("Run checks every transactions (default: %u)", defaultChainParams->DefaultConsistencyChecks())); - strUsage += HelpMessageOpt("-checkpoints", strprintf(_("Only accept block chain matching built-in checkpoints (default: %u)"), DEFAULT_CHECKPOINTS_ENABLED)); + strUsage += HelpMessageOpt("-checkpoints", strprintf("Only accept block chain matching built-in checkpoints (default: %u)", DEFAULT_CHECKPOINTS_ENABLED)); strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", DEFAULT_DISABLE_SAFEMODE)); - strUsage += HelpMessageOpt("-testsafemode", strprintf(_("Force safe mode (default: %u)"), DEFAULT_TESTSAFEMODE)); - strUsage += HelpMessageOpt("-deprecatedrpc=", _("Allows deprecated RPC method(s) to be used")); - strUsage += HelpMessageOpt("-dropmessagestest=", _("Randomly drop 1 of every network messages")); - strUsage += HelpMessageOpt("-fuzzmessagestest=", _("Randomly fuzz 1 of every network messages")); - strUsage += HelpMessageOpt("-stopafterblockimport", strprintf(_("Stop running after importing blocks from disk (default: %u)"), DEFAULT_STOPAFTERBLOCKIMPORT)); - strUsage += HelpMessageOpt("-limitancestorcount=", strprintf(_("Do not accept transactions if number of in-mempool ancestors is or more (default: %u)"), DEFAULT_ANCESTOR_LIMIT)); - strUsage += HelpMessageOpt("-limitancestorsize=", strprintf(_("Do not accept transactions whose size with all in-mempool ancestors exceeds kilobytes (default: %u)"), DEFAULT_ANCESTOR_SIZE_LIMIT)); - strUsage += HelpMessageOpt("-limitdescendantcount=", strprintf(_("Do not accept transactions if any ancestor would have or more in-mempool descendants (default: %u)"), DEFAULT_DESCENDANT_LIMIT)); - strUsage += HelpMessageOpt("-limitdescendantsize=", strprintf(_("Do not accept transactions if any ancestor would have more than kilobytes of in-mempool descendants (default: %u)."), DEFAULT_DESCENDANT_SIZE_LIMIT)); - strUsage += HelpMessageOpt("-sporkkey=", _("Enable spork administration functionality with the appropriate private key.")); + strUsage += HelpMessageOpt("-testsafemode", strprintf("Force safe mode (default: %u)", DEFAULT_TESTSAFEMODE)); + strUsage += HelpMessageOpt("-deprecatedrpc=", "Allows deprecated RPC method(s) to be used"); + strUsage += HelpMessageOpt("-dropmessagestest=", "Randomly drop 1 of every network messages"); + strUsage += HelpMessageOpt("-fuzzmessagestest=", "Randomly fuzz 1 of every network messages"); + strUsage += HelpMessageOpt("-stopafterblockimport", strprintf("Stop running after importing blocks from disk (default: %u)", DEFAULT_STOPAFTERBLOCKIMPORT)); + strUsage += HelpMessageOpt("-limitancestorcount=", strprintf("Do not accept transactions if number of in-mempool ancestors is or more (default: %u)", DEFAULT_ANCESTOR_LIMIT)); + strUsage += HelpMessageOpt("-limitancestorsize=", strprintf("Do not accept transactions whose size with all in-mempool ancestors exceeds kilobytes (default: %u)", DEFAULT_ANCESTOR_SIZE_LIMIT)); + strUsage += HelpMessageOpt("-limitdescendantcount=", strprintf("Do not accept transactions if any ancestor would have or more in-mempool descendants (default: %u)", DEFAULT_DESCENDANT_LIMIT)); + strUsage += HelpMessageOpt("-limitdescendantsize=", strprintf("Do not accept transactions if any ancestor would have more than kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT)); + strUsage += HelpMessageOpt("-sporkkey=", "Enable spork administration functionality with the appropriate private key."); strUsage += HelpMessageOpt("-nuparams=upgradeName:activationHeight", "Use given activation height for specified network upgrade (regtest-only)"); } - strUsage += HelpMessageOpt("-debug=", strprintf(_("Output debugging information (default: %u, supplying is optional)"), 0) + ". " + - _("If is not supplied, output all debugging information.") + _(" can be:") + " " + ListLogCategories() + "."); - strUsage += HelpMessageOpt("-debugexclude=", _("Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except one or more specified categories.")); + strUsage += HelpMessageOpt("-debug=", strprintf("Output debugging information (default: %u, supplying is optional)", 0) + ". " + + "If is not supplied, output all debugging information. can be: " + ListLogCategories() + "."); + strUsage += HelpMessageOpt("-debugexclude=", "Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except one or more specified categories."); if (showDebug) strUsage += HelpMessageOpt("-nodebug", "Turn off debugging messages, same as -debug=0"); - strUsage += HelpMessageOpt("-help-debug", _("Show all debugging options (usage: --help -help-debug)")); - strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), DEFAULT_LOGIPS)); - strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), DEFAULT_LOGTIMESTAMPS)); + strUsage += HelpMessageOpt("-help-debug", "Show all debugging options (usage: --help -help-debug)"); + strUsage += HelpMessageOpt("-logips", strprintf("Include IP addresses in debug output (default: %u)", DEFAULT_LOGIPS)); + strUsage += HelpMessageOpt("-logtimestamps", strprintf("Prepend debug output with timestamp (default: %u)", DEFAULT_LOGTIMESTAMPS)); strUsage += HelpMessageOpt("-logtimemicros", strprintf("Add microsecond precision to debug timestamps (default: %u)", DEFAULT_LOGTIMEMICROS)); if (showDebug) { strUsage += HelpMessageOpt("-mocktime=", "Replace actual time with seconds since epoch (default: 0)"); - strUsage += HelpMessageOpt("-maxsigcachesize=", strprintf(_("Limit size of signature cache to MiB (default: %u)"), DEFAULT_MAX_SIG_CACHE_SIZE)); + strUsage += HelpMessageOpt("-maxsigcachesize=", strprintf("Limit size of signature cache to MiB (default: %u)", DEFAULT_MAX_SIG_CACHE_SIZE)); } strUsage += HelpMessageOpt("-maxtipage=", strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)", DEFAULT_MAX_TIP_AGE)); - strUsage += HelpMessageOpt("-minrelaytxfee=", strprintf(_("Fees (in %s/Kb) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)"), CURRENCY_UNIT, FormatMoney(::minRelayTxFee.GetFeePerK()))); - strUsage += HelpMessageOpt("-printtoconsole", strprintf(_("Send trace/debug info to console instead of debug.log file (default: %u)"), 0)); + strUsage += HelpMessageOpt("-minrelaytxfee=", strprintf("Fees (in %s/Kb) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)", CURRENCY_UNIT, FormatMoney(::minRelayTxFee.GetFeePerK()))); + strUsage += HelpMessageOpt("-printtoconsole", strprintf("Send trace/debug info to console instead of debug.log file (default: %u)", 0)); if (showDebug) { strUsage += HelpMessageOpt("-dustrelayfee=", strprintf("Fee rate (in %s/kB) used to define dust, the value of an output such that it will cost more than its value in fees at this fee rate to spend it. (default: %s)", CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE))); strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY)); } - strUsage += HelpMessageOpt("-shrinkdebugfile", _("Shrink debug.log file on client startup (default: 1 when no -debug)")); + strUsage += HelpMessageOpt("-shrinkdebugfile", "Shrink debug.log file on client startup (default: 1 when no -debug)"); AppendParamsHelpMessages(strUsage, showDebug); - strUsage += HelpMessageOpt("-litemode=", strprintf(_("Disable all PIVX specific functionality (Masternodes, Budgeting) (0-1, default: %u)"), 0)); - - strUsage += HelpMessageGroup(_("Masternode options:")); - strUsage += HelpMessageOpt("-masternode=", strprintf(_("Enable the client to act as a masternode (0-1, default: %u)"), DEFAULT_MASTERNODE)); - strUsage += HelpMessageOpt("-mnconf=", strprintf(_("Specify masternode configuration file (default: %s)"), PIVX_MASTERNODE_CONF_FILENAME)); - strUsage += HelpMessageOpt("-mnconflock=", strprintf(_("Lock masternodes from masternode configuration file (default: %u)"), DEFAULT_MNCONFLOCK)); - strUsage += HelpMessageOpt("-masternodeprivkey=", _("Set the masternode private key")); - strUsage += HelpMessageOpt("-masternodeaddr=", strprintf(_("Set external address:port to get to this masternode (example: %s)"), "128.127.106.235:51472")); - strUsage += HelpMessageOpt("-budgetvotemode=", _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)")); - strUsage += HelpMessageOpt("-mnoperatorprivatekey=", _("Set the masternode operator private key. Only valid with -masternode=1. When set, the masternode acts as a deterministic masternode.")); - - strUsage += HelpMessageGroup(_("Node relay options:")); + strUsage += HelpMessageOpt("-litemode=", strprintf("Disable all PIVX specific functionality (Masternodes, Budgeting) (0-1, default: %u)", 0)); + + strUsage += HelpMessageGroup("Masternode options:"); + strUsage += HelpMessageOpt("-masternode=", strprintf("Enable the client to act as a masternode (0-1, default: %u)", DEFAULT_MASTERNODE)); + strUsage += HelpMessageOpt("-mnconf=", strprintf("Specify masternode configuration file (default: %s)", PIVX_MASTERNODE_CONF_FILENAME)); + strUsage += HelpMessageOpt("-mnconflock=", strprintf("Lock masternodes from masternode configuration file (default: %u)", DEFAULT_MNCONFLOCK)); + strUsage += HelpMessageOpt("-masternodeprivkey=", "Set the masternode private key"); + strUsage += HelpMessageOpt("-masternodeaddr=", strprintf("Set external address:port to get to this masternode (example: %s)", "128.127.106.235:51472")); + strUsage += HelpMessageOpt("-budgetvotemode=", "Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)"); + strUsage += HelpMessageOpt("-mnoperatorprivatekey=", "Set the masternode operator private key. Only valid with -masternode=1. When set, the masternode acts as a deterministic masternode."); + + strUsage += HelpMessageGroup("Node relay options:"); if (showDebug) { strUsage += HelpMessageOpt("-acceptnonstdtxn", strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)", "testnet/regtest only; ", !CreateChainParams(CBaseChainParams::TESTNET)->RequireStandard())); } - strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER)); - strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY)); + strUsage += HelpMessageOpt("-datacarrier", strprintf("Relay and mine data carrier transactions (default: %u)", DEFAULT_ACCEPT_DATACARRIER)); + strUsage += HelpMessageOpt("-datacarriersize", strprintf("Maximum size of data in data carrier transactions we relay and mine (default: %u)", MAX_OP_RETURN_RELAY)); if (showDebug) { strUsage += HelpMessageOpt("-blockversion=", "Override block version to test forking scenarios"); } - strUsage += HelpMessageGroup(_("Block creation options:")); - strUsage += HelpMessageOpt("-blockmaxsize=", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE)); + strUsage += HelpMessageGroup("Block creation options:"); + strUsage += HelpMessageOpt("-blockmaxsize=", strprintf("Set maximum block size in bytes (default: %d)", DEFAULT_BLOCK_MAX_SIZE)); if (showDebug) strUsage += HelpMessageOpt("-blockversion=", "Override block version to test forking scenarios"); - strUsage += HelpMessageGroup(_("RPC server options:")); - strUsage += HelpMessageOpt("-server", _("Accept command line and JSON-RPC commands")); - strUsage += HelpMessageOpt("-rest", strprintf(_("Accept public REST requests (default: %u)"), DEFAULT_REST_ENABLE)); - strUsage += HelpMessageOpt("-rpcbind=", _("Bind to given address to listen for JSON-RPC connections. Do not expose the RPC server to untrusted networks such as the public internet! This option is ignored unless -rpcallowip is also passed. Port is optional and overrides -rpcport. Use [host]:port notation for IPv6. This option can be specified multiple times (default: 127.0.0.1 and ::1 i.e., localhost)")); - strUsage += HelpMessageOpt("-rpccookiefile=", _("Location of the auth cookie (default: data dir)")); - strUsage += HelpMessageOpt("-rpcuser=", _("Username for JSON-RPC connections")); - strUsage += HelpMessageOpt("-rpcpassword=", _("Password for JSON-RPC connections")); - strUsage += HelpMessageOpt("-rpcauth=", _("Username and hashed password for JSON-RPC connections. The field comes in the format: :$. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=/rpcpassword= pair of arguments. This option can be specified multiple times")); - strUsage += HelpMessageOpt("-rpcport=", strprintf(_("Listen for JSON-RPC connections on (default: %u or testnet: %u)"), defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort())); - strUsage += HelpMessageOpt("-rpcallowip=", _("Allow JSON-RPC connections from specified source. Valid for are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times")); - strUsage += HelpMessageOpt("-rpcthreads=", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS)); + strUsage += HelpMessageGroup("RPC server options:"); + strUsage += HelpMessageOpt("-server", "Accept command line and JSON-RPC commands"); + strUsage += HelpMessageOpt("-rest", strprintf("Accept public REST requests (default: %u)", DEFAULT_REST_ENABLE)); + strUsage += HelpMessageOpt("-rpcbind=", "Bind to given address to listen for JSON-RPC connections. Do not expose the RPC server to untrusted networks such as the public internet! This option is ignored unless -rpcallowip is also passed. Port is optional and overrides -rpcport. Use [host]:port notation for IPv6. This option can be specified multiple times (default: 127.0.0.1 and ::1 i.e., localhost)"); + strUsage += HelpMessageOpt("-rpccookiefile=", "Location of the auth cookie (default: data dir)"); + strUsage += HelpMessageOpt("-rpcuser=", "Username for JSON-RPC connections"); + strUsage += HelpMessageOpt("-rpcpassword=", "Password for JSON-RPC connections"); + strUsage += HelpMessageOpt("-rpcauth=", "Username and hashed password for JSON-RPC connections. The field comes in the format: :$. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=/rpcpassword= pair of arguments. This option can be specified multiple times"); + strUsage += HelpMessageOpt("-rpcport=", strprintf("Listen for JSON-RPC connections on (default: %u or testnet: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort())); + strUsage += HelpMessageOpt("-rpcallowip=", "Allow JSON-RPC connections from specified source. Valid for are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"); + strUsage += HelpMessageOpt("-rpcthreads=", strprintf("Set the number of threads to service RPC calls (default: %d)", DEFAULT_HTTP_THREADS)); if (showDebug) { strUsage += HelpMessageOpt("-rpcworkqueue=", strprintf("Set the depth of the work queue to service RPC calls (default: %d)", DEFAULT_HTTP_WORKQUEUE)); strUsage += HelpMessageOpt("-rpcservertimeout=", strprintf("Timeout during HTTP requests (default: %d)", DEFAULT_HTTP_SERVER_TIMEOUT)); } - strUsage += HelpMessageOpt("-blockspamfilter=", strprintf(_("Use block spam filter (default: %u)"), DEFAULT_BLOCK_SPAM_FILTER)); - strUsage += HelpMessageOpt("-blockspamfiltermaxsize=", strprintf(_("Maximum size of the list of indexes in the block spam filter (default: %u)"), DEFAULT_BLOCK_SPAM_FILTER_MAX_SIZE)); - strUsage += HelpMessageOpt("-blockspamfiltermaxavg=", strprintf(_("Maximum average size of an index occurrence in the block spam filter (default: %u)"), DEFAULT_BLOCK_SPAM_FILTER_MAX_AVG)); + strUsage += HelpMessageOpt("-blockspamfilter=", strprintf("Use block spam filter (default: %u)", DEFAULT_BLOCK_SPAM_FILTER)); + strUsage += HelpMessageOpt("-blockspamfiltermaxsize=", strprintf("Maximum size of the list of indexes in the block spam filter (default: %u)", DEFAULT_BLOCK_SPAM_FILTER_MAX_SIZE)); + strUsage += HelpMessageOpt("-blockspamfiltermaxavg=", strprintf("Maximum average size of an index occurrence in the block spam filter (default: %u)", DEFAULT_BLOCK_SPAM_FILTER_MAX_AVG)); return strUsage; } @@ -626,7 +626,7 @@ std::string LicenseInfo() "\n" + FormatParagraph(strprintf(_("Copyright (C) 2014-%i The Dash Core Developers"), COPYRIGHT_YEAR)) + "\n" + "\n" + - FormatParagraph(strprintf(_("Copyright (C) 2015-%i The PIVX Core Developers"), COPYRIGHT_YEAR)) + "\n" + + FormatParagraph(strprintf(_("Copyright (C) 2015-%i The %s Developers"), COPYRIGHT_YEAR, PACKAGE_NAME)) + "\n" + "\n" + FormatParagraph(_("This is experimental software.")) + "\n" + "\n" + @@ -1026,7 +1026,7 @@ void InitLogging() #else version_string += " (release build)"; #endif - LogPrintf("PIVX version %s (%s)\n", version_string, CLIENT_DATE); + LogPrintf("PIVX version %s\n", version_string); } bool AppInitParameterInteraction() @@ -1194,7 +1194,7 @@ static bool LockDataDirectory(bool probeOnly) return UIError(strprintf(_("Cannot write to data directory '%s'; check permissions."), datadir.string())); } if (!LockDirectory(datadir, ".lock", probeOnly)) { - return UIError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), datadir.string(), _(PACKAGE_NAME))); + return UIError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), datadir.string(), PACKAGE_NAME)); } return true; } @@ -1210,7 +1210,7 @@ bool AppInitSanityChecks() // Sanity check if (!InitSanityCheck()) - return UIError(strprintf(_("Initialization sanity check failed. %s is shutting down."), _(PACKAGE_NAME))); + return UIError(strprintf(_("Initialization sanity check failed. %s is shutting down."), PACKAGE_NAME)); // Probe the data directory lock to give an early error message, if possible return LockDataDirectory(true); diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp index b6aeda01a16f..e514d45b9410 100644 --- a/src/masternode-sync.cpp +++ b/src/masternode-sync.cpp @@ -185,11 +185,13 @@ int CMasternodeSync::GetNextAsset(int currentAsset) void CMasternodeSync::SwitchToNextAsset() { + if (RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL || + RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED) { + ClearFulfilledRequest(); + } const int nextAsset = GetNextAsset(RequestedMasternodeAssets); if (nextAsset == MASTERNODE_SYNC_FINISHED) { LogPrintf("%s - Sync has finished\n", __func__); - } else if (nextAsset == MASTERNODE_SYNC_FAILED) { - ClearFulfilledRequest(); } RequestedMasternodeAssets = nextAsset; RequestedMasternodeAttempt = 0; @@ -341,9 +343,6 @@ bool CMasternodeSync::SyncWithNode(CNode* pnode, bool fLegacyMnObsolete) return false; } - if (pnode->HasFulfilledRequest("mnsync")) return true; - pnode->FulfilledRequest("mnsync"); - // timeout if (lastMasternodeList == 0 && (RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD * 3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT * 5)) { @@ -361,6 +360,10 @@ bool CMasternodeSync::SyncWithNode(CNode* pnode, bool fLegacyMnObsolete) if (RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD * 3) return false; + // Request mnb sync if we haven't requested it yet. + if (pnode->HasFulfilledRequest("mnsync")) return true; + pnode->FulfilledRequest("mnsync"); + mnodeman.DsegUpdate(pnode); RequestedMasternodeAttempt++; return false; @@ -377,9 +380,6 @@ bool CMasternodeSync::SyncWithNode(CNode* pnode, bool fLegacyMnObsolete) return false; } - if (pnode->HasFulfilledRequest("mnwsync")) return true; - pnode->FulfilledRequest("mnwsync"); - // timeout if (lastMasternodeWinner == 0 && (RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD * 3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT * 5)) { @@ -397,6 +397,10 @@ bool CMasternodeSync::SyncWithNode(CNode* pnode, bool fLegacyMnObsolete) if (RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD * 3) return false; + // Request mnw sync if we haven't requested it yet. + if (pnode->HasFulfilledRequest("mnwsync")) return true; + pnode->FulfilledRequest("mnwsync"); + int nMnCount = mnodeman.CountEnabled(); g_connman->PushMessage(pnode, msgMaker.Make(NetMsgType::GETMNWINNERS, nMnCount)); //sync payees RequestedMasternodeAttempt++; @@ -423,11 +427,12 @@ bool CMasternodeSync::SyncWithNode(CNode* pnode, bool fLegacyMnObsolete) return false; } + if (RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD * 3) return false; + + // Request bud sync if we haven't requested it yet. if (pnode->HasFulfilledRequest("busync")) return true; pnode->FulfilledRequest("busync"); - if (RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD * 3) return false; - uint256 n; g_connman->PushMessage(pnode, msgMaker.Make(NetMsgType::BUDGETVOTESYNC, n)); //sync masternode votes RequestedMasternodeAttempt++; diff --git a/src/net.cpp b/src/net.cpp index c14650a0f166..b0211ff6d063 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -869,7 +869,7 @@ void CheckOffsetDisconnectedPeers(const CNetAddr& ip) setOffsetDisconnectedPeers.clear(); // Trigger the warning std::string strWarn1 = _("Peers are being disconnected due time differences."); - std::string strWarn2 = _("Please check that your computer's date and time are correct! If your clock is wrong PIVX Core will not work properly."); + std::string strWarn2 = strprintf(_("Please check that your computer's date and time are correct! If your clock is wrong %s will not work properly."), PACKAGE_NAME); LogPrintf("*** Warning: %s %s\n", strWarn1, strWarn2); @@ -1824,7 +1824,7 @@ bool CConnman::BindListenPort(const CService& addrBind, std::string& strError, b if (::bind(hListenSocket, (struct sockaddr*)&sockaddr, len) == SOCKET_ERROR) { int nErr = WSAGetLastError(); if (nErr == WSAEADDRINUSE) - strError = strprintf(_("Unable to bind to %s on this computer. PIVX Core is probably already running."), addrBind.ToString()); + strError = strprintf(_("Unable to bind to %s on this computer. %s is probably already running."), addrBind.ToString(), PACKAGE_NAME); else strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %s)"), addrBind.ToString(), NetworkErrorString(nErr)); LogPrintf("%s\n", strError); diff --git a/src/obj/.gitignore b/src/obj/.gitignore deleted file mode 100644 index d6b7ef32c847..000000000000 --- a/src/obj/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/src/pivx-cli-res.rc b/src/pivx-cli-res.rc index c42f803fac20..c90b76b89582 100644 --- a/src/pivx-cli-res.rc +++ b/src/pivx-cli-res.rc @@ -16,14 +16,14 @@ BEGIN BEGIN BLOCK "040904E4" // U.S. English - multilingual (hex) BEGIN - VALUE "CompanyName", "Pivx" - VALUE "FileDescription", "Pivx-cli (OSS RPC client for Pivx)" + VALUE "CompanyName", "PIVX" + VALUE "FileDescription", "pivx-cli (OSS RPC client for " PACKAGE_NAME ")" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "pivx-cli" VALUE "LegalCopyright", COPYRIGHT_STR VALUE "LegalTrademarks1", "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php." VALUE "OriginalFilename", "pivx-cli.exe" - VALUE "ProductName", "Pivx-cli" + VALUE "ProductName", "pivx-cli" VALUE "ProductVersion", VER_PRODUCTVERSION_STR END END diff --git a/src/pivx-cli.cpp b/src/pivx-cli.cpp index a7a51b3ea198..d815df8d73a5 100644 --- a/src/pivx-cli.cpp +++ b/src/pivx-cli.cpp @@ -5,6 +5,10 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "chainparamsbase.h" #include "clientversion.h" #include "fs.h" @@ -32,19 +36,19 @@ std::string HelpMessageCli() const auto defaultBaseParams = CreateBaseChainParams(CBaseChainParams::MAIN); const auto testnetBaseParams = CreateBaseChainParams(CBaseChainParams::TESTNET); std::string strUsage; - strUsage += HelpMessageGroup(_("Options:")); - strUsage += HelpMessageOpt("-?", _("This help message")); - strUsage += HelpMessageOpt("-conf=", strprintf(_("Specify configuration file (default: %s)"), PIVX_CONF_FILENAME)); - strUsage += HelpMessageOpt("-datadir=", _("Specify data directory")); + strUsage += HelpMessageGroup("Options:"); + strUsage += HelpMessageOpt("-?", "This help message"); + strUsage += HelpMessageOpt("-conf=", strprintf("Specify configuration file (default: %s)", PIVX_CONF_FILENAME)); + strUsage += HelpMessageOpt("-datadir=", "Specify data directory"); AppendParamsHelpMessages(strUsage); - strUsage += HelpMessageOpt("-named", strprintf(_("Pass named instead of positional arguments (default: %s)"), DEFAULT_NAMED)); - strUsage += HelpMessageOpt("-rpcconnect=", strprintf(_("Send commands to node running on (default: %s)"), DEFAULT_RPCCONNECT)); - strUsage += HelpMessageOpt("-rpcport=", strprintf(_("Listen for JSON-RPC connections on (default: %u or testnet: %u)"), defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort())); - strUsage += HelpMessageOpt("-rpcwait", _("Wait for RPC server to start")); - strUsage += HelpMessageOpt("-rpcuser=", _("Username for JSON-RPC connections")); - strUsage += HelpMessageOpt("-rpcpassword=", _("Password for JSON-RPC connections")); - strUsage += HelpMessageOpt("-rpcclienttimeout=", strprintf(_("Timeout in seconds during HTTP requests, or 0 for no timeout. (default: %d)"), DEFAULT_HTTP_CLIENT_TIMEOUT)); - strUsage += HelpMessageOpt("-rpcwallet=", _("Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to pivxd)")); + strUsage += HelpMessageOpt("-named", strprintf("Pass named instead of positional arguments (default: %s)", DEFAULT_NAMED)); + strUsage += HelpMessageOpt("-rpcconnect=", strprintf("Send commands to node running on (default: %s)", DEFAULT_RPCCONNECT)); + strUsage += HelpMessageOpt("-rpcport=", strprintf("Listen for JSON-RPC connections on (default: %u or testnet: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort())); + strUsage += HelpMessageOpt("-rpcwait", "Wait for RPC server to start"); + strUsage += HelpMessageOpt("-rpcuser=", "Username for JSON-RPC connections"); + strUsage += HelpMessageOpt("-rpcpassword=", "Password for JSON-RPC connections"); + strUsage += HelpMessageOpt("-rpcclienttimeout=", strprintf("Timeout in seconds during HTTP requests, or 0 for no timeout. (default: %d)", DEFAULT_HTTP_CLIENT_TIMEOUT)); + strUsage += HelpMessageOpt("-rpcwallet=", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to pivxd)"); return strUsage; } @@ -73,14 +77,13 @@ static bool AppInitRPC(int argc, char* argv[]) // gArgs.ParseParameters(argc, argv); if (argc < 2 || gArgs.IsArgSet("-?") || gArgs.IsArgSet("-h") || gArgs.IsArgSet("-help") || gArgs.IsArgSet("-version")) { - std::string strUsage = _("PIVX Core RPC client version") + " " + FormatFullVersion() + "\n"; + std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n"; if (!gArgs.IsArgSet("-version")) { - strUsage += "\n" + _("Usage:") + "\n" + - " pivx-cli [options] [params] " + _("Send command to PIVX Core") + "\n" + - " pivx-cli [options] -named [name=value] ... " + _("Send command to PIVX Core (with named arguments)") + "\n" + - " pivx-cli [options] help " + _("List commands") + "\n" + - " pivx-cli [options] help " + _("Get help for a command") + "\n"; - + strUsage += "\n" + "Usage: pivx-cli [options] [params] Send command to " PACKAGE_NAME "\n" + "or: pivx-cli [options] -named [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n" + "or: pivx-cli [options] help List commands\n" + "or: pivx-cli [options] help Get help for a command\n"; strUsage += "\n" + HelpMessageCli(); } diff --git a/src/pivx-tx.cpp b/src/pivx-tx.cpp index 118e4c98bb5f..ff4b25bb3c5b 100644 --- a/src/pivx-tx.cpp +++ b/src/pivx-tx.cpp @@ -3,6 +3,10 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "clientversion.h" #include "coins.h" #include "core_io.h" @@ -43,43 +47,42 @@ static bool AppInitRawTx(int argc, char* argv[]) if (argc < 2 || gArgs.IsArgSet("-?") || gArgs.IsArgSet("-h") || gArgs.IsArgSet("-help")) { // First part of help message is specific to this utility - std::string strUsage = _("Pivx Core pivx-tx utility version") + " " + FormatFullVersion() + "\n\n" + - _("Usage:") + "\n" + - " pivx-tx [options] [commands] " + _("Update hex-encoded pivx transaction") + "\n" + - " pivx-tx [options] -create [commands] " + _("Create hex-encoded pivx transaction") + "\n" + + std::string strUsage = PACKAGE_NAME " pivx-tx utility version " + FormatFullVersion() + "\n\n" + + "Usage: pivx-tx [options] [commands] Update hex-encoded pivx transaction\n" + + "or: pivx-tx [options] -create [commands] Create hex-encoded pivx transaction\n" + "\n"; fprintf(stdout, "%s", strUsage.c_str()); - strUsage = HelpMessageGroup(_("Options:")); - strUsage += HelpMessageOpt("-?", _("This help message")); - strUsage += HelpMessageOpt("-create", _("Create new, empty TX.")); - strUsage += HelpMessageOpt("-json", _("Select JSON output")); - strUsage += HelpMessageOpt("-txid", _("Output only the hex-encoded transaction id of the resultant transaction.")); - strUsage += HelpMessageOpt("-regtest", _("Enter regression test mode, which uses a special chain in which blocks can be solved instantly.")); - strUsage += HelpMessageOpt("-testnet", _("Use the test network")); + strUsage = HelpMessageGroup("Options:"); + strUsage += HelpMessageOpt("-?", "This help message"); + strUsage += HelpMessageOpt("-create", "Create new, empty TX."); + strUsage += HelpMessageOpt("-json", "Select JSON output"); + strUsage += HelpMessageOpt("-txid", "Output only the hex-encoded transaction id of the resultant transaction."); + strUsage += HelpMessageOpt("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly."); + strUsage += HelpMessageOpt("-testnet", "Use the test network"); fprintf(stdout, "%s", strUsage.c_str()); - strUsage = HelpMessageGroup(_("Commands:")); - strUsage += HelpMessageOpt("delin=N", _("Delete input N from TX")); - strUsage += HelpMessageOpt("delout=N", _("Delete output N from TX")); - strUsage += HelpMessageOpt("in=TXID:VOUT", _("Add input to TX")); - strUsage += HelpMessageOpt("locktime=N", _("Set TX lock time to N")); - strUsage += HelpMessageOpt("nversion=N", _("Set TX version to N")); - strUsage += HelpMessageOpt("outaddr=VALUE:ADDRESS", _("Add address-based output to TX")); - strUsage += HelpMessageOpt("outscript=VALUE:SCRIPT", _("Add raw script output to TX")); - strUsage += HelpMessageOpt("sign=SIGHASH-FLAGS", _("Add zero or more signatures to transaction") + ". " + - _("This command requires JSON registers:") + - _("prevtxs=JSON object") + ", " + - _("privatekeys=JSON object") + ". " + - _("See signrawtransaction docs for format of sighash flags, JSON objects.")); + strUsage = HelpMessageGroup("Commands:"); + strUsage += HelpMessageOpt("delin=N", "Delete input N from TX"); + strUsage += HelpMessageOpt("delout=N", "Delete output N from TX"); + strUsage += HelpMessageOpt("in=TXID:VOUT", "Add input to TX"); + strUsage += HelpMessageOpt("locktime=N", "Set TX lock time to N"); + strUsage += HelpMessageOpt("nversion=N", "Set TX version to N"); + strUsage += HelpMessageOpt("outaddr=VALUE:ADDRESS", "Add address-based output to TX"); + strUsage += HelpMessageOpt("outscript=VALUE:SCRIPT", "Add raw script output to TX"); + strUsage += HelpMessageOpt("sign=SIGHASH-FLAGS", "Add zero or more signatures to transaction. " + "This command requires JSON registers:" + "prevtxs=JSON object, " + "privatekeys=JSON object. " + "See signrawtransaction docs for format of sighash flags, JSON objects."); fprintf(stdout, "%s", strUsage.c_str()); - strUsage = HelpMessageGroup(_("Register Commands:")); - strUsage += HelpMessageOpt("load=NAME:FILENAME", _("Load JSON file FILENAME into register NAME")); - strUsage += HelpMessageOpt("set=NAME:JSON-STRING", _("Set register NAME to given JSON-STRING")); + strUsage = HelpMessageGroup("Register Commands:"); + strUsage += HelpMessageOpt("load=NAME:FILENAME", "Load JSON file FILENAME into register NAME"); + strUsage += HelpMessageOpt("set=NAME:JSON-STRING", "Set register NAME to given JSON-STRING"); fprintf(stdout, "%s", strUsage.c_str()); return false; diff --git a/src/pivxd-res.rc b/src/pivxd-res.rc index 3de3882b6f9b..3c56ba457b73 100644 --- a/src/pivxd-res.rc +++ b/src/pivxd-res.rc @@ -17,7 +17,7 @@ BEGIN BLOCK "040904E4" // U.S. English - multilingual (hex) BEGIN VALUE "CompanyName", "PIVX" - VALUE "FileDescription", "pivxd (OSS daemon/client for PIVX)" + VALUE "FileDescription", "pivxd (PIVX node with a JSON-RPC server)" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "pivxd" VALUE "LegalCopyright", COPYRIGHT_STR diff --git a/src/pivxd.cpp b/src/pivxd.cpp index fc96a5e1b1a8..5d4139a28e24 100644 --- a/src/pivxd.cpp +++ b/src/pivxd.cpp @@ -5,6 +5,10 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or https://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "chainparams.h" #include "clientversion.h" #include "fs.h" @@ -57,14 +61,12 @@ bool AppInit(int argc, char* argv[]) // Process help and version before taking care about datadir if (gArgs.IsArgSet("-?") || gArgs.IsArgSet("-h") || gArgs.IsArgSet("-help") || gArgs.IsArgSet("-version")) { - std::string strUsage = _("Pivx Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n"; + std::string strUsage = PACKAGE_NAME " Daemon version " + FormatFullVersion() + "\n"; if (gArgs.IsArgSet("-version")) { strUsage += LicenseInfo(); } else { - strUsage += "\n" + _("Usage:") + "\n" + - " pivxd [options] " + _("Start Pivx Core Daemon") + "\n"; - + strUsage += "\nUsage: pivxd [options] Start " PACKAGE_NAME " Daemon\n"; strUsage += "\n" + HelpMessage(HMM_BITCOIND); } diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index 8bc3830807e8..d697fe1cd572 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -298,8 +298,9 @@ class AddressTablePriv int sizeSend() { return sendNum; } int sizeRecv() { return recvNum; } int sizeDell() { return dellNum; } - int SizeColdSend() { return coldSendNum; } + int sizeColdSend() { return coldSendNum; } int sizeShieldedSend() { return shieldedSendNum; } + int sizeSendAll() { return sizeSend() + sizeColdSend() + sizeShieldedSend(); } AddressTableEntry* index(int idx) { @@ -338,8 +339,9 @@ int AddressTableModel::columnCount(const QModelIndex& parent) const int AddressTableModel::sizeSend() const { return priv->sizeSend(); } int AddressTableModel::sizeRecv() const { return priv->sizeRecv(); } int AddressTableModel::sizeDell() const { return priv->sizeDell(); } -int AddressTableModel::sizeColdSend() const { return priv->SizeColdSend(); } +int AddressTableModel::sizeColdSend() const { return priv->sizeColdSend(); } int AddressTableModel::sizeShieldedSend() const { return priv->sizeShieldedSend(); } +int AddressTableModel::sizeSendAll() const { return priv->sizeSendAll(); } QVariant AddressTableModel::data(const QModelIndex& index, int role) const { diff --git a/src/qt/addresstablemodel.h b/src/qt/addresstablemodel.h index 32d16f8534b0..7fd41bef8e9a 100644 --- a/src/qt/addresstablemodel.h +++ b/src/qt/addresstablemodel.h @@ -65,6 +65,7 @@ class AddressTableModel : public QAbstractTableModel int sizeDell() const; int sizeColdSend() const; int sizeShieldedSend() const; + int sizeSendAll() const; void notifyChange(const QModelIndex &index); QVariant data(const QModelIndex& index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role); diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index f4045a51203e..e3073693c022 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -4,6 +4,10 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "askpassphrasedialog.h" #include "ui_askpassphrasedialog.h" #include @@ -347,9 +351,9 @@ void AskPassphraseDialog::warningMessage() openStandardDialog( tr("Wallet encrypted"), "" + - tr("PIVX will close now to finish the encryption process. " + tr("%1 will close now to finish the encryption process. " "Remember that encrypting your wallet cannot fully protect " - "your PIVs from being stolen by malware infecting your computer.") + + "your PIVs from being stolen by malware infecting your computer.").arg(PACKAGE_NAME) + "

" + tr("IMPORTANT: Any previous backups you have made of your wallet file " "should be replaced with the newly generated, encrypted wallet file. " diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 785983ffaa5b..89c4bf2b63e7 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -253,11 +253,6 @@ QString ClientModel::formatFullVersion() const return QString::fromStdString(FormatFullVersion()); } -QString ClientModel::formatBuildDate() const -{ - return QString::fromStdString(CLIENT_DATE); -} - bool ClientModel::isReleaseVersion() const { return CLIENT_VERSION_IS_RELEASE; diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index d5237c1e5ccc..0cf9f5ad5d61 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -82,7 +82,6 @@ class ClientModel : public QObject QString getStatusBarWarnings() const; QString formatFullVersion() const; - QString formatBuildDate() const; bool isReleaseVersion() const; QString clientName() const; QString formatClientStartupTime() const; diff --git a/src/qt/forms/helpmessagedialog.ui b/src/qt/forms/helpmessagedialog.ui index 6475d1494130..34aa5f81dd50 100644 --- a/src/qt/forms/helpmessagedialog.ui +++ b/src/qt/forms/helpmessagedialog.ui @@ -21,9 +21,6 @@ 10 - - PIVX Core - Command-line options - #HelpMessageDialog { background-color:#FFFFFF; diff --git a/src/qt/forms/intro.ui b/src/qt/forms/intro.ui index d4a94d4caadd..1801fa6db65b 100644 --- a/src/qt/forms/intro.ui +++ b/src/qt/forms/intro.ui @@ -96,12 +96,12 @@ 30 - + QLabel { font-style:italic; } - Welcome to PIVX Core. + Welcome to %1. Qt::AlignCenter @@ -128,7 +128,7 @@ - + 0 @@ -136,7 +136,7 @@ - As this is the first time the program is launched, you can choose where PIVX Core will store its data. + As this is the first time the program is launched, you can choose where %1 will store its data. Qt::AlignCenter @@ -154,7 +154,7 @@ } - PIVX Core will download and store a copy of the PIVX block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 will download and store a copy of the PIVX block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. Qt::AlignCenter diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index 6ea75dba4d39..e08f85068330 100644 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -17,7 +17,7 @@ - 4 + 0 @@ -113,36 +113,13 @@ - - - Build date - - - - - - - IBeamCursor - - - N/A - - - Qt::PlainText - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - Startup time - + IBeamCursor @@ -158,21 +135,21 @@ - + Data Directory - + N/A - + @@ -185,14 +162,14 @@ - + Name - + IBeamCursor @@ -208,14 +185,14 @@ - + Number of connections - + IBeamCursor @@ -231,14 +208,14 @@ - + Number of Masternodes - + IBeamCursor @@ -254,7 +231,7 @@ - + @@ -267,14 +244,14 @@ - + Current number of blocks - + IBeamCursor @@ -290,14 +267,14 @@ - + Last block time - + IBeamCursor @@ -313,21 +290,21 @@ - + Last block hash - + N/A - + Qt::Vertical @@ -340,7 +317,7 @@ - + @@ -353,7 +330,7 @@ - + Open the PIVX debug log file from the current data directory. This can take a few seconds for large log files. diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index c8485cdb14ea..095228c928ad 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -4,6 +4,10 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "intro.h" #include "ui_intro.h" @@ -113,8 +117,8 @@ Intro::Intro(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::W setCssProperty(ui->frame, "container-welcome-step2"); setCssProperty(ui->container, "container-welcome-stack"); setCssProperty(ui->frame_2, "container-welcome"); - setCssProperty(ui->label_2, "text-title-welcome"); - setCssProperty(ui->label_4, "text-intro-white"); + setCssProperty(ui->welcomeLabel, "text-title-welcome"); + setCssProperty(ui->storageLabel, "text-intro-white"); setCssProperty(ui->sizeWarningLabel, "text-intro-white"); setCssProperty(ui->freeSpace, "text-intro-white"); setCssProperty(ui->errorMessage, "text-intro-white"); @@ -129,7 +133,9 @@ Intro::Intro(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::W connect(ui->pushButtonOk, &QPushButton::clicked, this, &Intro::accept); connect(ui->pushButtonCancel, &QPushButton::clicked, this, &Intro::close); - ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(BLOCK_CHAIN_SIZE / GB_BYTES)); + ui->welcomeLabel->setText(ui->welcomeLabel->text().arg(PACKAGE_NAME)); + ui->storageLabel->setText(ui->storageLabel->text().arg(PACKAGE_NAME)); + ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(PACKAGE_NAME).arg(BLOCK_CHAIN_SIZE / GB_BYTES)); startThread(); } @@ -199,7 +205,7 @@ bool Intro::pickDataDirectory() } break; } catch (const fs::filesystem_error& e) { - QMessageBox::critical(0, tr("PIVX Core"), + QMessageBox::critical(nullptr, PACKAGE_NAME, tr("Error: Specified data directory \"%1\" cannot be created.").arg(dataDir)); // fall through, back to choosing screen } diff --git a/src/qt/locale/pivx_en.ts b/src/qt/locale/pivx_en.ts index 7271b992bcd4..12d68647aaa9 100644 --- a/src/qt/locale/pivx_en.ts +++ b/src/qt/locale/pivx_en.ts @@ -375,7 +375,7 @@ Are you sure? - + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. @@ -447,12 +447,7 @@ for staking - - PIVX will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your PIVs from being stolen by malware infecting your computer. - - - - + Are you sure you wish to encrypt your wallet? Are you sure you wish to encrypt your wallet? @@ -478,7 +473,12 @@ for staking - + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your PIVs from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. @@ -762,12 +762,12 @@ for staking - + Unselect all - + Please switch to "List mode" to use this function. @@ -837,13 +837,18 @@ for staking - + + Delegated to %1 + + + + Select All - + no no @@ -1357,7 +1362,7 @@ It will start automatically as soon as the wallet has enough confirmations on an FreespaceChecker - + A new data directory will be created. A new data directory will be created. @@ -1385,73 +1390,28 @@ It will start automatically as soon as the wallet has enough confirmations on an HelpMessageDialog - + version version - - PIVX Core + + About %1 - + (%1-bit) (%1-bit) - - About PIVX Core - - - - + Command-line options Command-line options - - Usage: - Usage: - - - - command-line options - command-line options - - - - UI Options: - - - - - Choose data directory on startup (default: %u) - - - - - Show splash screen on startup (default: %u) - - - - - Hide QT staking charts on startup (default: %u) - - - - - Set language, for example "de_DE" (default: system locale) - Set language, for example "de_DE" (default: system locale) - - - - Start minimized - Start minimized - - - + OK @@ -1465,17 +1425,17 @@ It will start automatically as soon as the wallet has enough confirmations on an - Welcome to PIVX Core. + Welcome to %1. - As this is the first time the program is launched, you can choose where PIVX Core will store its data. + As this is the first time the program is launched, you can choose where %1 will store its data. - PIVX Core will download and store a copy of the PIVX block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 will download and store a copy of the PIVX block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. @@ -1499,12 +1459,7 @@ It will start automatically as soon as the wallet has enough confirmations on an - - PIVX Core - - - - + Error: Specified data directory "%1" cannot be created. Error: Specified data directory "%1" cannot be created. @@ -1578,7 +1533,7 @@ It will start automatically as soon as the wallet has enough confirmations on an Form - + Collateral tx not found @@ -1671,7 +1626,7 @@ It will start automatically as soon as the wallet has enough confirmations on an - + address label cannot be empty @@ -1686,7 +1641,7 @@ It will start automatically as soon as the wallet has enough confirmations on an - + Unknown error @@ -1716,7 +1671,7 @@ It will start automatically as soon as the wallet has enough confirmations on an - + To create a PIVX Masternode you must dedicate %1 (the unit of PIVX) to the network (however, these coins are still yours and will never leave your possession). @@ -1746,7 +1701,7 @@ It will start automatically as soon as the wallet has enough confirmations on an - + Invalid masternode.conf file @@ -1842,7 +1797,7 @@ Please wait few more minutes (masternode collaterals require %1 confirmations).< - + Background task is being executed, please wait @@ -1887,7 +1842,7 @@ Please wait few more minutes (masternode collaterals require %1 confirmations).< - + What is a Masternode? @@ -1907,7 +1862,7 @@ Please wait few more minutes (masternode collaterals require %1 confirmations).< - + You are just about to export the required data to run a Masternode on a remote server to your clipboard. @@ -2122,14 +2077,7 @@ STAKING PIVXGUI - - - - PIVX Core - - - - + Wallet Wallet @@ -2160,7 +2108,7 @@ STAKING - PIVX Core client + %1 client @@ -2333,15 +2281,7 @@ Address: %4 - - - - - PIVX Core - - - - + Error: Specified data directory "%1" does not exist. @@ -2356,12 +2296,12 @@ Address: %4 - + %1 didn't yet exit safely... - + Error reading masternode configuration file: %1 @@ -3187,7 +3127,7 @@ Address: %4 - + Add Label @@ -3270,7 +3210,7 @@ try unlocking the wallet - + New address created @@ -3406,7 +3346,7 @@ try unlocking the wallet - + Error Error @@ -3441,7 +3381,7 @@ try unlocking the wallet - + Request for @@ -3674,12 +3614,12 @@ Do you want to continue? - + Customize Fee - + Maximum amount of outputs reached @@ -3741,7 +3681,7 @@ These coins will no longer be cold-staked. - + Memo @@ -3751,7 +3691,7 @@ These coins will no longer be cold-staked. - + Coin Control @@ -3842,7 +3782,7 @@ Do you want to continue? - + Error generating address to shield PIVs @@ -4554,7 +4494,7 @@ There was an error trying to save the address list to %1. Please try again. - + PIVX is a form of digital online money using blockchain technology that can be easily transferred globally, instantly, and with near zero fees. PIVX incorporates market leading security & privacy and is also the first PoS (Proof of Stake) Cryptocurrency to implement Sapling(SHIELD), a zk-SNARKs based privacy protocol. @@ -4609,12 +4549,7 @@ There was an error trying to save the address list to %1. Please try again. - - A masternode is a computer running a full node PIVX core wallet with a requirement of %1 secured collateral to provide extra services to the network and in return, receive a portion of the block reward regularly. These services include: - - - - + %1 per single Masternode instance @@ -4629,7 +4564,12 @@ There was an error trying to save the address list to %1. Please try again. - + + A masternode is a computer running a full node %1 wallet with a requirement of %2 secured collateral to provide extra services to the network and in return, receive a portion of the block reward regularly. These services include: + + + + A decentralized budgeting system (Treasury) @@ -4890,12 +4830,7 @@ There was an error trying to save the address list to %1. Please try again. - - Start PIVX on system login - - - - + Minimize to the tray instead of the taskbar @@ -4905,7 +4840,12 @@ There was an error trying to save the address list to %1. Please try again. - + + Start %1 on system login + + + + Reset Options @@ -5458,8 +5398,8 @@ Are you sure? ShutdownWindow - - PIVX Core is shutting down... + + %1 is shutting down... @@ -5493,11 +5433,6 @@ Are you sure? Loading… - - - PIVX Core - - SplashScreen @@ -5672,12 +5607,7 @@ backup will be created. - - Tor Active: %1 - - - - + Tor Disabled @@ -5758,7 +5688,12 @@ backup will be created. - + + Tor Active + + + + Wallet Unencrypted @@ -6236,7 +6171,7 @@ backup will be created. WalletModel - + Send Coins Send Coins @@ -6301,13 +6236,7 @@ Select fewer inputs with coin control. - - Welcome to -PIVX Core Wallet - - - - + PIVX is the world’s most innovative Proof of Stake blockchain based technology. Developed by a team of highly experienced developers and cryptographers. @@ -6327,12 +6256,18 @@ PIVX Core Wallet - + + Welcome to +%1 Wallet + + + + What is a Masternode? - + default default @@ -6340,464 +6275,169 @@ PIVX Core Wallet pivx-core - - Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times - Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times + + Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>. + Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>. - - Bind to given address and always listen on it. Use [host]:port notation for IPv6 - Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + Error: Listening for incoming connections failed (listen returned error %s) + Error: Listening for incoming connections failed (listen returned error %s) - - Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 - Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 + + The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct + + + + + Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. + Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. - Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces) - Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces) + Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. + - - Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto) - Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto) + + Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. + Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. - Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:%u) - Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:%u) + "local" vote is no longer available with DMNs. Use "alias" from the wallet with the voting key. + - Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) - Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) + %s Invalid %s address or hostname: '%s' + - - Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup - Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup + + %s corrupt, salvage failed + - - Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>. - Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>. + + %s is not allowed in combination with enabled wallet functionality + - - Enable cold staking functionality (0-1, default: %u). Disabled if staking=0 + + %s is only allowed with a single wallet file - - Enable spork administration functionality with the appropriate private key. + + Cannot downgrade wallet. - - Error: Listening for incoming connections failed (listen returned error %s) - Error: Listening for incoming connections failed (listen returned error %s) + + Cannot set %s or %s together with %s + - - Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except one or more specified categories. + + Cannot upgrade a locked wallet. - - Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) - Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) + + Copyright (C) 2009-%i The Bitcoin Core Developers + Copyright (C) 2009-%i The Bitcoin Core Developers - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + Copyright (C) 2014-%i The Dash Core Developers + - - Execute command when the best block changes (%s in cmd is replaced by block hash) - Execute command when the best block changes (%s in cmd is replaced by block hash) + + Corrupted block database detected + Corrupted block database detected - - Flush database activity from memory pool to disk log every <n> megabytes (default: %u) - Flush database activity from memory pool to disk log every <n> megabytes (default: %u) + + Could not open debug log file %s + - - If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) - If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) + + Could not parse masternode.conf + Could not parse masternode.conf - - Log transaction priority and fee per kB when mining blocks (default: %u) - Log transaction priority and fee per kB when mining blocks (default: %u) + + Deterministic masternodes are not enforced yet + - - Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u) - Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u) + + Do you want to rebuild the block database now? + Do you want to rebuild the block database now? - - Maximum average size of an index occurrence in the block spam filter (default: %u) + + Done loading + Done loading + + + + Elliptic curve cryptography sanity check failure. Aborting. - - Maximum size of data in data carrier transactions we relay and mine (default: %u) - Maximum size of data in data carrier transactions we relay and mine (default: %u) + + Error initializing block database + Error initializing block database - - Maximum size of the list of indexes in the block spam filter (default: %u) + + Error initializing wallet database environment %s! + + + Error loading block database + Error loading block database + - Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s) - Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s) + Error opening block database + Error opening block database - - Number of seconds to keep misbehaving peers from reconnecting (default: %u) - Number of seconds to keep misbehaving peers from reconnecting (default: %u) + + Error reading from database, shutting down. + Error reading from database, shutting down. - Output debugging information (default: %u, supplying <category> is optional) - Output debugging information (default: %u, supplying <category> is optional) + Error + Error - - Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u) - + + Error: A fatal internal error occured, see debug.log for details + Error: A fatal internal error occured, see debug.log for details - Require high priority for relaying free or low-fee transactions (default:%u) - Require high priority for relaying free or low-fee transactions (default:%u) + Error: Disk space is low! + Error: Disk space is low! - - Send trace/debug info to console instead of debug.log file (default: %u) - Send trace/debug info to console instead of debug.log file (default: %u) + + Failed to parse host:port string + - Set maximum size of high-priority/low-fee transactions in bytes (default: %d) - Set maximum size of high-priority/low-fee transactions in bytes (default: %d) - - - - Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) - Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) - - - - Set the number of threads for coin generation if enabled (-1 = all cores, default: %d) - Set the number of threads for coin generation if enabled (-1 = all cores, default: %d) - - - - Support filtering of blocks and transaction with bloom filters (default: %u) - - - - - The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct - - - - - Unable to bind to %s on this computer. PIVX Core is probably already running. - - - - - Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) - Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) - - - - Warning: Please check that your computer's date and time are correct! If your clock is wrong PIVX Core will not work properly. - - - - - Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. - Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. - - - - Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. - - - - - Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. - Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. - - - - Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. - Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. - - - - Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway - Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway - - - - "local" vote is no longer available with DMNs. Use "alias" from the wallet with the voting key. - - - - - %s Invalid %s address or hostname: '%s' - - - - - %s corrupt, salvage failed - - - - - %s is not allowed in combination with enabled wallet functionality - - - - - %s is only allowed with a single wallet file - - - - - (default: %s) - (default: %s) - - - - Accept command line and JSON-RPC commands - Accept command line and JSON-RPC commands - - - - Accept public REST requests (default: %u) - Accept public REST requests (default: %u) - - - - Add a node to connect to and attempt to keep the connection open - Add a node to connect to and attempt to keep the connection open - - - - Always query for peer addresses via DNS lookup (default: %u) - Always query for peer addresses via DNS lookup (default: %u) - - - - Append comment to the user agent string - - - - - Automatically create Tor hidden service (default: %d) - - - - - Block creation options: - Block creation options: - - - - Cannot downgrade wallet. - - - - - Cannot set %s or %s together with %s - - - - - Cannot upgrade a locked wallet. - - - - - Connect through SOCKS5 proxy - Connect through SOCKS5 proxy - - - - Connect to a node to retrieve peer addresses, and disconnect - Connect to a node to retrieve peer addresses, and disconnect - - - - Connection options: - Connection options: - - - - Copyright (C) 2009-%i The Bitcoin Core Developers - Copyright (C) 2009-%i The Bitcoin Core Developers - - - - Copyright (C) 2014-%i The Dash Core Developers - - - - - Copyright (C) 2015-%i The PIVX Core Developers - - - - - Corrupted block database detected - Corrupted block database detected - - - - Could not open debug log file %s - - - - - Could not parse masternode.conf - Could not parse masternode.conf - - - - Debugging/Testing options: - Debugging/Testing options: - - - - Delete blockchain folders and resync from scratch - - - - - Deterministic masternodes are not enforced yet - - - - - Disable OS notifications for incoming transactions (default: %u) - - - - - Discover own IP address (default: 1 when listening and no -externalip) - Discover own IP address (default: 1 when listening and no -externalip) - - - - Do you want to rebuild the block database now? - Do you want to rebuild the block database now? - - - - Done loading - Done loading - - - - Elliptic curve cryptography sanity check failure. Aborting. - - - - - Enable the client to act as a masternode (0-1, default: %u) - Enable the client to act as a masternode (0-1, default: %u) - - - - Error initializing block database - Error initializing block database - - - - Error initializing wallet database environment %s! - - - - - Error loading block database - Error loading block database - - - - Error opening block database - Error opening block database - - - - Error reading from database, shutting down. - Error reading from database, shutting down. - - - - Error - Error - - - - Error: A fatal internal error occured, see debug.log for details - Error: A fatal internal error occured, see debug.log for details - - - - Error: Disk space is low! - Error: Disk space is low! - - - - Failed to parse host:port string - - - - - Force safe mode (default: %u) - Force safe mode (default: %u) - - - - Generate coins (default: %u) - Generate coins (default: %u) - - - - How many blocks to check at startup (default: %u, 0 = all) - How many blocks to check at startup (default: %u, 0 = all) - - - - If <category> is not supplied, output all debugging information. - If <category> is not supplied, output all debugging information. - - - - Importing... - Importing... - - - - Imports blocks from external blk000??.dat file - Imports blocks from external blk000??.dat file - - - - Include IP addresses in debug output (default: %u) - Include IP addresses in debug output (default: %u) + Importing... + Importing... @@ -6820,77 +6460,17 @@ PIVX Core Wallet - + This is a pre-release test build - use at your own risk - do not use for staking or merchant applications! - - Specify custom backup path to add a copy of any wallet backup. If set as dir, every backup generates a timestamped file. If set as file, will rewrite to that file every backup. - - - - - <category> can be: - - - - - Attempt to force blockchain corruption recovery - - - - - Display verbose coin stake messages in the debug.log file. - - - - - Do not load the wallet and disable wallet RPC calls (default: %u) - - - - - Enable publish hash block in <address> - - - - - Enable publish hash transaction in <address> - - - - - Enable publish raw block in <address> - - - - - Enable publish raw transaction in <address> - - - - - Enable staking functionality (0-1, default: %u) - - - - + Error: A fatal internal error occurred, see debug.log for details - - (1 = keep tx meta data e.g. payment request information, 2 = drop tx meta data) - - - - - Accept connections from outside (default: %u if no -proxy or -connect/-noconnect) - - - - + Cannot find the Sapling parameters in the following directory: %s Please run 'sapling-fetch-params' or './util/fetch-params.sh' and then restart. @@ -6902,12 +6482,7 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - - Disable all PIVX specific functionality (Masternodes, Budgeting) (0-1, default: %u) - - - - + This file contains all of your private keys in plain text. DO NOT send this file to anyone! @@ -6917,17 +6492,12 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - + Unable to replay blocks. You will need to rebuild the database using %s. - Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can be specified multiple times - - - - Warning: %s is set very high! Fees this large could be paid on a single transaction. @@ -6942,56 +6512,31 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - + A fatal internal error occurred, see debug.log for details - - Allow DNS lookups for -addnode, -seednode and -connect (default: %u) - - - - - Attempt to recover private keys from a corrupt wallet file - - - - + Calculating money supply... - + Error loading %s: Wallet corrupted - - Error loading %s: Wallet requires newer version of PIVX Core - - - - + Error loading %s - Error loading wallet %s. %s filename must be a regular file. - - - - Error loading wallet %s. Duplicate %s filename specified. - - - Error loading wallet %s. Invalid characters in %s filename. - - Error upgrading chainstate database @@ -7028,7 +6573,7 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - + Invalid amount for -%s=<amount>: '%s' @@ -7038,25 +6583,10 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - - Keep at most <n> unconnectable transactions in memory (default: %u) - Keep at most <n> unconnectable transactions in memory (default: %u) - - - + Line: %d Line: %d - - - Listen for JSON-RPC connections on <port> (default: %u or testnet: %u) - Listen for JSON-RPC connections on <port> (default: %u or testnet: %u) - - - - Listen for connections on <port> (default: %u or testnet: %u) - Listen for connections on <port> (default: %u or testnet: %u) - Loading addresses... @@ -7099,276 +6629,101 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - Location of the auth cookie (default: data dir) - - - - - Lock masternodes from masternode configuration file (default: %u) - Lock masternodes from masternode configuration file (default: %u) - - - MNs synchronization pending... - - Maintain at most <n> connections to peers (default: %u) - Maintain at most <n> connections to peers (default: %u) - - - - Masternode options: - Masternode options: - - - - Maximum per-connection receive buffer, <n>*1000 bytes (default: %u) - Maximum per-connection receive buffer, <n>*1000 bytes (default: %u) - - - - Maximum per-connection send buffer, <n>*1000 bytes (default: %u) - Maximum per-connection send buffer, <n>*1000 bytes (default: %u) - - - - Mining/Staking options: - - - - - Specify zk params directory (default: %s) - - - - - Node relay options: - Node relay options: - - - + Not enough file descriptors available. Not enough file descriptors available. - Number of custom location backups to retain (default: %d) - - - - - On first run, create a legacy wallet instead of a HD wallet - - - - - Only accept block chain matching built-in checkpoints (default: %u) - Only accept block chain matching built-in checkpoints (default: %u) - - - - Only connect to nodes in network <net> (ipv4, ipv6 or onion) - Only connect to nodes in network <net> (ipv4, ipv6 or onion) - - - - Options: - Options: - - - - Password for JSON-RPC connections - Password for JSON-RPC connections - - - Peers are being disconnected due time differences. - + Unknown network specified in %s: '%s' - - Upgrading coins database if needed... - - - - - Use block spam filter (default: %u) - - - - - Use the test chain - - - - - Verifying wallet(s)... - - - - - Wallet %s resides outside data directory %s - - - - - Wallet debugging/testing options: - - - - - Preparing for resync... - - - - - Cannot obtain a lock on data directory %s. %s is probably already running. - - - - - Cannot start deterministic masternode before enforcement. Remove %s to start as legacy masternode - - - - - Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections - - - - - Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u) - - - - - Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u). - - - - - Do not accept transactions if number of in-mempool ancestors is <n> or more (default: %u) - - - - - Do not accept transactions whose size with all in-mempool ancestors exceeds <n> kilobytes (default: %u) - - - - - Do not keep transactions in the mempool longer than <n> hours (default: %u) - - - - - Enabling Masternode support requires turning on transaction indexing.Please add %s to your configuration and start with %s - - - - - Error loading wallet %s. %s parameter must only specify a filename (not a path). - - - - - Error: Unsupported argument %s found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. - - - - - Failed to create backup, file already exists! This could happen if you restarted wallet in less than 60 seconds. You can continue if you are ok with this. + + Upgrading coins database if needed... - - Fees (in %s/Kb) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s) + + Verifying wallet(s)... - - Fees (in %s/Kb) smaller than this are considered zero fee for transaction creation (default: %s) + + Wallet %s resides outside data directory %s - - Invalid amount for %s: '%s' (must be at least the minimum relay fee of %s to prevent stuck transactions) + + Preparing for resync... - - Legacy masternode system disabled. Use %s to start as deterministic masternode + + Cannot obtain a lock on data directory %s. %s is probably already running. - - Minimum positive amount (in PIV) allowed by GUI and RPC for the stake split threshold (default: %s) + + Cannot start deterministic masternode before enforcement. Remove %s to start as legacy masternode - - Please check that your computer's date and time are correct! If your clock is wrong PIVX Core will not work properly. + + Enabling Masternode support requires turning on transaction indexing.Please add %s to your configuration and start with %s - - Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect) + + Error: Unsupported argument %s found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. - - Set the masternode operator private key. Only valid with -masternode=1. When set, the masternode acts as a deterministic masternode. + + Failed to create backup, file already exists! This could happen if you restarted wallet in less than 60 seconds. You can continue if you are ok with this. - - Specify directory to hold blocks subdirectory for *.dat files (default: <datadir>) + + Invalid amount for %s: '%s' (must be at least the minimum relay fee of %s to prevent stuck transactions) - Specify location of debug log file: this can be an absolute path or a path relative to the data directory (default: %s) + Legacy masternode system disabled. Use %s to start as deterministic masternode - + System error while flushing the chainstate after pruning invalid entries. Possible corrupt database. - + WARNING: The transaction has been signed and recorded, so the wallet will try to re-send it. Use 'abandontransaction' to cancel it. (txid: %s) - - Whether to save the mempool on shutdown and load on restart (default: %u) - - - - + (must be %d for %s-net) - + Active Masternode not initialized. - - Allows deprecated RPC method(s) to be used - - - - + Can't generate a change-address key. Please call keypoolrefill first. @@ -7379,25 +6734,15 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - Chain selection options: - - - - Change index out of range - + Failed to accept tx in the memory pool (reason: %s) - - - Failed to create backup, error: %s - - Failed to delete backup, error: %s @@ -7414,12 +6759,7 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - - Fee (in %s/kB) to add to transactions you send (default: %s) - - - - + Initialization sanity check failed. %s is shutting down. @@ -7468,11 +6808,6 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos Invalid status error. - - - Keep the transaction memory pool below <n> megabytes (default: %u) - - Keypool ran out, please call keypoolrefill first, or unlock the wallet. @@ -7484,17 +6819,12 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - - Limit size of signature cache to <n> MiB (default: %u) - - - - + Loading/Pruning invalid outputs... - + Need to specify a port with %s: '%s' @@ -7513,141 +6843,26 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos No error - - - Number of automatic wallet backups (default: %d) - - OS cryptographic RNG sanity check failure. Aborting. - - Prepend debug output with timestamp (default: %u) - Prepend debug output with timestamp (default: %u) - - - - Print version and exit - - - - - RPC server options: - RPC server options: - - - - Randomly drop 1 of every <n> network messages - Randomly drop 1 of every <n> network messages - - - - Randomly fuzz 1 of every <n> network messages - Randomly fuzz 1 of every <n> network messages - - - + Reaccepting wallet transactions... - - - Rebuild block chain index from current blk000??.dat files - Rebuild block chain index from current blk000??.dat files - - - - Relay and mine data carrier transactions (default: %u) - Relay and mine data carrier transactions (default: %u) - - - - Relay non-P2SH multisig (default: %u) - Relay non-P2SH multisig (default: %u) - Replaying blocks... - - - Rescan the block chain for missing wallet transactions - Rescan the block chain for missing wallet transactions - Rescanning... Rescanning... - - - Run a thread to flush wallet periodically (default: %u) - Run a thread to flush wallet periodically (default: %u) - - - - Run in the background as a daemon and accept commands - Run in the background as a daemon and accept commands - - - - Set database cache size in megabytes (%d to %d, default: %d) - Set database cache size in megabytes (%d to %d, default: %d) - - - - Set external address:port to get to this masternode (example: %s) - Set external address:port to get to this masternode (example: %s) - - - - Set key pool size to <n> (default: %u) - Set key pool size to <n> (default: %u) - - - - Set maximum block size in bytes (default: %d) - Set maximum block size in bytes (default: %d) - - - - Set minimum block size in bytes (default: %u) - Set minimum block size in bytes (default: %u) - - - - Set the Maximum reorg depth (default: %u) - - - - - Set the masternode private key - Set the masternode private key - - - - Set the number of threads to service RPC calls (default: %d) - Set the number of threads to service RPC calls (default: %d) - - - - Sets the DB_PRIVATE flag in the wallet db environment (default: %u) - Sets the DB_PRIVATE flag in the wallet db environment (default: %u) - - - - Show all debugging options (usage: --help -help-debug) - Show all debugging options (usage: --help -help-debug) - - - - Shrink debug.log file on client startup (default: 1 when no -debug) - Shrink debug.log file on client startup (default: 1 when no -debug) - Shutdown requested over the txs scan. Exiting. @@ -7659,56 +6874,11 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos Signing transaction failed - + Specified blocks directory "%s" does not exist. - - - Specify configuration file (default: %s) - Specify configuration file (default: %s) - - - - Specify connection timeout in milliseconds (minimum: 1, default: %d) - Specify connection timeout in milliseconds (minimum: 1, default: %d) - - - - Specify data directory - Specify data directory - - - - Specify masternode configuration file (default: %s) - Specify masternode configuration file (default: %s) - - - - Specify pid file (default: %s) - Specify pid file (default: %s) - - - - Specify wallet file (within data directory) - Specify wallet file (within data directory) - - - - Specify your own public address - Specify your own public address - - - - Spend unconfirmed change when sending transactions (default: %u) - Spend unconfirmed change when sending transactions (default: %u) - - - - Stop running after importing blocks from disk (default: %u) - Stop running after importing blocks from disk (default: %u) - Synchronization failed @@ -7744,11 +6914,6 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos The threshold value cannot be less than %s - - - This help message - This help message - This is experimental software. @@ -7775,22 +6940,57 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - - Threshold for disconnecting misbehaving peers (default: %u) - Threshold for disconnecting misbehaving peers (default: %u) + + Invalid -wallet path '%s'. -wallet path should point to a directory where wallet.dat and database/log.?????????? files can be stored, a location where such a directory could be created or (for backwards compatibility) the name of an existing data file in -walletdir (%s) + - - Tor control port password (default: empty) + + Please check that your computer's date and time are correct! If your clock is wrong %s will not work properly. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong %s will not work properly. + + + + + Copyright (C) 2015-%i The %s Developers + + + + + Could not find asmap file %s + + + + + Could not parse asmap file %s + + + + + Error loading %s: Wallet requires newer version of %s + + + + + Specified -walletdir "%s" does not exist - Tor control port to use if onion listening enabled (default: %s) + Specified -walletdir "%s" is a relative path + Specified -walletdir "%s" is not a directory + + + + Transaction amount too small Transaction amount too small @@ -7824,6 +7024,11 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos Unable to bind to %s on this computer (bind returned error %s) Unable to bind to %s on this computer (bind returned error %s) + + + Unable to bind to %s on this computer. %s is probably already running. + + Unable to generate initial key! @@ -7845,18 +7050,18 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - - Warning: Unsupported argument %s ignored, use %s + + Wallet needed to be rewritten: restart %s to complete - - Warning: Unsupported argument %s ignored, use %s. + + Warning: Unsupported argument %s ignored, use %s - Wasn't able to create wallet backup folder %s! + Warning: Unsupported argument %s ignored, use %s. @@ -7870,30 +7075,15 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - + Unsupported logging category %s=%s. - - - Upgrade wallet to latest format - Upgrade wallet to latest format - - Use UPnP to map the listening port (default: %u) - Use UPnP to map the listening port (default: %u) - - - User Agent comment (%s) contains unsafe characters. - - - Username for JSON-RPC connections - Username for JSON-RPC connections - Verifying blocks... @@ -7901,21 +7091,6 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos - Wallet needed to be rewritten: restart PIVX Core to complete - - - - - Wallet options: - Wallet options: - - - - Wallet window title - Wallet window title - - - Warning Warning @@ -7925,20 +7100,10 @@ Please run 'sapling-fetch-params' or './util/fetch-params.sh&apos Warning: This version is obsolete, upgrade required! - + Zapping all transactions from wallet... Zapping all transactions from wallet... - - - ZeroMQ notification options: - - - - - on startup - on startup - send diff --git a/src/qt/pivx.cpp b/src/qt/pivx.cpp index 5ab45ecb0af4..c15a221f0e48 100644 --- a/src/qt/pivx.cpp +++ b/src/qt/pivx.cpp @@ -608,14 +608,14 @@ int main(int argc, char* argv[]) /// 6. Determine availability of data and blocks directory and parse pivx.conf /// - Do not call GetDataDir(true) before this step finishes if (!fs::is_directory(GetDataDir(false))) { - QMessageBox::critical(0, QObject::tr("PIVX Core"), + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(gArgs.GetArg("-datadir", "")))); return 1; } try { gArgs.ReadConfigFile(gArgs.GetArg("-conf", PIVX_CONF_FILENAME)); } catch (const std::exception& e) { - QMessageBox::critical(0, QObject::tr("PIVX Core"), + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what())); return 0; } @@ -630,7 +630,7 @@ int main(int argc, char* argv[]) try { SelectParams(gArgs.GetChainName()); } catch(const std::exception& e) { - QMessageBox::critical(0, QObject::tr("PIVX Core"), QObject::tr("Error: %1").arg(e.what())); + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error: %1").arg(e.what())); return 1; } #ifdef ENABLE_WALLET @@ -649,7 +649,7 @@ int main(int argc, char* argv[]) /// 7a. parse masternode.conf std::string strErr; if (!masternodeConfig.read(strErr)) { - QMessageBox::critical(0, QObject::tr("PIVX Core"), + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error reading masternode configuration file: %1").arg(strErr.c_str())); return 0; } @@ -719,7 +719,7 @@ int main(int argc, char* argv[]) app.createWindow(networkStyle.data()); app.requestInitialize(); #if defined(Q_OS_WIN) - WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId()); + WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(PACKAGE_NAME), (HWND)app.getMainWinId()); #endif app.exec(); app.requestShutdown(); @@ -728,7 +728,7 @@ int main(int argc, char* argv[]) PrintExceptionContinue(&e, "Runaway exception"); app.handleRunawayException(QString::fromStdString(GetWarnings("gui"))); } catch (...) { - PrintExceptionContinue(NULL, "Runaway exception"); + PrintExceptionContinue(nullptr, "Runaway exception"); app.handleRunawayException(QString::fromStdString(GetWarnings("gui"))); } return app.getReturnValue(); diff --git a/src/qt/pivx/addresseswidget.cpp b/src/qt/pivx/addresseswidget.cpp index 56425435dea4..1f3bd1dcb052 100644 --- a/src/qt/pivx/addresseswidget.cpp +++ b/src/qt/pivx/addresseswidget.cpp @@ -4,8 +4,8 @@ #include "qt/pivx/addresseswidget.h" #include "qt/pivx/forms/ui_addresseswidget.h" +#include "qt/pivx/addressfilterproxymodel.h" #include "qt/pivx/addresslabelrow.h" -#include "qt/pivx/addnewaddressdialog.h" #include "qt/pivx/tooltipmenu.h" #include "qt/pivx/addnewcontactdialog.h" @@ -23,11 +23,10 @@ class ContactsHolder : public FurListRow { public: - ContactsHolder(); - explicit ContactsHolder(bool _isLightTheme) : FurListRow(), isLightTheme(_isLightTheme){} - AddressLabelRow* createHolder(int pos) override{ + AddressLabelRow* createHolder(int pos) override + { if (!cachedRow) cachedRow = new AddressLabelRow(); cachedRow->init(isLightTheme, false); return cachedRow; @@ -35,7 +34,7 @@ class ContactsHolder : public FurListRow void init(QWidget* holder,const QModelIndex &index, bool isHovered, bool isSelected) const override { - AddressLabelRow* row = static_cast(holder); + AddressLabelRow* row = dynamic_cast(holder); row->updateState(isLightTheme, isHovered, isSelected); @@ -133,15 +132,15 @@ AddressesWidget::AddressesWidget(PIVXGUI* parent) : connect(ui->btnAddContact, &OptionButton::clicked, this, &AddressesWidget::onAddContactShowHideClicked); } -void AddressesWidget::handleAddressClicked(const QModelIndex &index) +void AddressesWidget::handleAddressClicked(const QModelIndex& _index) { - ui->listAddresses->setCurrentIndex(index); - QRect rect = ui->listAddresses->visualRect(index); + ui->listAddresses->setCurrentIndex(_index); + QRect rect = ui->listAddresses->visualRect(_index); QPoint pos = rect.topRight(); pos.setX(pos.x() - (DECORATION_SIZE * 2)); pos.setY(pos.y() + (DECORATION_SIZE)); - QModelIndex rIndex = filter->mapToSource(index); + QModelIndex rIndex = filter->mapToSource(_index); if (!this->menu) { this->menu = new TooltipMenu(window, this); @@ -152,7 +151,7 @@ void AddressesWidget::handleAddressClicked(const QModelIndex &index) } else { this->menu->hide(); } - this->index = rIndex; + index = rIndex; menu->move(pos); menu->show(); } @@ -175,7 +174,7 @@ void AddressesWidget::loadWalletModel() void AddressesWidget::updateListView() { - bool empty = addressTablemodel->sizeSend() == 0; + bool empty = addressTablemodel->sizeSendAll() == 0; ui->emptyContainer->setVisible(empty); ui->listAddresses->setVisible(!empty); } @@ -250,8 +249,9 @@ void AddressesWidget::onEditClicked() void AddressesWidget::onDeleteClicked() { if (walletModel) { - if (ask(tr("Delete Contact"), tr("You are just about to remove the contact:\n\n%1\n\nAre you sure?").arg(index.data(Qt::DisplayRole).toString().toUtf8().constData())) - ) { + if (ask(tr("Delete Contact"), + tr("You are just about to remove the contact:\n\n%1\n\nAre you sure?") + .arg(index.data(Qt::DisplayRole).toString().toUtf8().constData()))) { if (this->walletModel->getAddressTableModel()->removeRows(index.row(), 1, index)) { updateListView(); inform(tr("Contact Deleted")); @@ -299,7 +299,7 @@ void AddressesWidget::sortAddresses() void AddressesWidget::changeTheme(bool isLightTheme, QString& theme) { - static_cast(this->delegate->getRowFactory())->isLightTheme = isLightTheme; + dynamic_cast(this->delegate->getRowFactory())->isLightTheme = isLightTheme; } AddressesWidget::~AddressesWidget() diff --git a/src/qt/pivx/addresseswidget.h b/src/qt/pivx/addresseswidget.h index 9305efe6ef97..e91451c35570 100644 --- a/src/qt/pivx/addresseswidget.h +++ b/src/qt/pivx/addresseswidget.h @@ -7,13 +7,11 @@ #include "qt/pivx/pwidget.h" #include "addresstablemodel.h" -#include "qt/pivx/tooltipmenu.h" #include "furabstractlistitemdelegate.h" -#include "qt/pivx/addressfilterproxymodel.h" #include -class AddressViewDelegate; +class AddressFilterProxyModel; class TooltipMenu; class PIVXGUI; class WalletModel; @@ -35,7 +33,6 @@ class AddressesWidget : public PWidget ~AddressesWidget(); void loadWalletModel() override; - void onNewContactClicked(); private Q_SLOTS: void handleAddressClicked(const QModelIndex &index); @@ -55,7 +52,6 @@ private Q_SLOTS: AddressTableModel* addressTablemodel = nullptr; AddressFilterProxyModel *filter = nullptr; - bool isOnMyAddresses = true; TooltipMenu* menu = nullptr; // Cached index diff --git a/src/qt/pivx/addressfilterproxymodel.cpp b/src/qt/pivx/addressfilterproxymodel.cpp index 53c3952153b9..314a0004a285 100644 --- a/src/qt/pivx/addressfilterproxymodel.cpp +++ b/src/qt/pivx/addressfilterproxymodel.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "qt/pivx/addressfilterproxymodel.h" -#include +#include "qt/addresstablemodel.h" bool AddressFilterProxyModel::filterAcceptsRow(int row, const QModelIndex& parent) const { diff --git a/src/qt/pivx/addressfilterproxymodel.h b/src/qt/pivx/addressfilterproxymodel.h index 6e8090aeece1..96c1e0bd5fbb 100644 --- a/src/qt/pivx/addressfilterproxymodel.h +++ b/src/qt/pivx/addressfilterproxymodel.h @@ -6,8 +6,6 @@ #define PIVX_CORE_NEW_GUI_ADDRESSFILTERPROXYMODEL_H #include -#include "addresstablemodel.h" - class AddressFilterProxyModel final : public QSortFilterProxyModel { diff --git a/src/qt/pivx/addresslabelrow.cpp b/src/qt/pivx/addresslabelrow.cpp index e21583bb571c..55ceddb67b27 100644 --- a/src/qt/pivx/addresslabelrow.cpp +++ b/src/qt/pivx/addresslabelrow.cpp @@ -19,7 +19,7 @@ void AddressLabelRow::init(bool isLightTheme, bool isHover) updateState(isLightTheme, isHover, false); } -void AddressLabelRow::updateView(QString address, QString label) +void AddressLabelRow::updateView(const QString& address, const QString& label) { ui->lblAddress->setText(address); ui->lblLabel->setText(label); diff --git a/src/qt/pivx/addresslabelrow.h b/src/qt/pivx/addresslabelrow.h index 81780024efc7..2dd476981374 100644 --- a/src/qt/pivx/addresslabelrow.h +++ b/src/qt/pivx/addresslabelrow.h @@ -22,7 +22,7 @@ class AddressLabelRow : public QWidget void init(bool isLightTheme, bool isHover); void updateState(bool isLightTheme, bool isHovered, bool isSelected); - void updateView(QString address, QString label); + void updateView(const QString& address, const QString& label); protected: virtual void enterEvent(QEvent *); virtual void leaveEvent(QEvent *); diff --git a/src/qt/pivx/forms/send.ui b/src/qt/pivx/forms/send.ui index 92f7c805cacf..cf35794a6f8c 100644 --- a/src/qt/pivx/forms/send.ui +++ b/src/qt/pivx/forms/send.ui @@ -255,7 +255,7 @@ padding-top:2px; margin-left:8px; - PIVX address or contact label + Recipient address diff --git a/src/qt/pivx/forms/welcomecontentwidget.ui b/src/qt/pivx/forms/welcomecontentwidget.ui index 56b3fab5def1..08a431ab44c2 100644 --- a/src/qt/pivx/forms/welcomecontentwidget.ui +++ b/src/qt/pivx/forms/welcomecontentwidget.ui @@ -937,7 +937,7 @@ Welcome to -PIVX Core Wallet +%1 Wallet Qt::AlignCenter diff --git a/src/qt/pivx/mnmodel.cpp b/src/qt/pivx/mnmodel.cpp index cb237980b322..c4dfcab0a287 100644 --- a/src/qt/pivx/mnmodel.cpp +++ b/src/qt/pivx/mnmodel.cpp @@ -106,12 +106,7 @@ QVariant MNModel::data(const QModelIndex &index, int role) const return "Not available"; } case WAS_COLLATERAL_ACCEPTED:{ - if (!isAvailable) return false; - std::string txHash = rec->vin.prevout.hash.GetHex(); - if (!collateralTxAccepted.value(txHash) && walletModel) { - return walletModel->getWalletTxDepth(rec->vin.prevout.hash) > 0; - } - return true; + return isAvailable && collateralTxAccepted.value(rec->vin.prevout.hash.GetHex()); } } } diff --git a/src/qt/pivx/myaddressrow.cpp b/src/qt/pivx/myaddressrow.cpp index a9739f31b29a..154abacea021 100644 --- a/src/qt/pivx/myaddressrow.cpp +++ b/src/qt/pivx/myaddressrow.cpp @@ -15,7 +15,7 @@ MyAddressRow::MyAddressRow(QWidget *parent) : ui->labelDate->setProperty("cssClass", "text-list-caption"); } -void MyAddressRow::updateView(QString address, QString label, QString date){ +void MyAddressRow::updateView(const QString& address, const QString& label, const QString& date){ ui->labelName->setText(label); ui->labelAddress->setText(address); if (date.isEmpty()){ diff --git a/src/qt/pivx/myaddressrow.h b/src/qt/pivx/myaddressrow.h index 90bd078b14fe..3062a0a00eb2 100644 --- a/src/qt/pivx/myaddressrow.h +++ b/src/qt/pivx/myaddressrow.h @@ -19,7 +19,7 @@ class MyAddressRow : public QWidget explicit MyAddressRow(QWidget *parent = nullptr); ~MyAddressRow(); - void updateView(QString address, QString label, QString date); + void updateView(const QString& address, const QString& label, const QString& date); private: Ui::MyAddressRow *ui; diff --git a/src/qt/pivx/pivxgui.cpp b/src/qt/pivx/pivxgui.cpp index 0f0f4278d599..dfb703026702 100644 --- a/src/qt/pivx/pivxgui.cpp +++ b/src/qt/pivx/pivxgui.cpp @@ -66,7 +66,7 @@ PIVXGUI::PIVXGUI(const NetworkStyle* networkStyle, QWidget* parent) : QString windowTitle = QString::fromStdString(gArgs.GetArg("-windowtitle", "")); if (windowTitle.isEmpty()) { - windowTitle = tr("PIVX Core") + " - "; + windowTitle = QString{PACKAGE_NAME} + " - "; windowTitle += ((enableWallet) ? tr("Wallet") : tr("Node")); } windowTitle += " " + networkStyle->getTitleAddText(); @@ -210,7 +210,7 @@ void PIVXGUI::createTrayIcon(const NetworkStyle* networkStyle) { #ifndef Q_OS_MAC trayIcon = new QSystemTrayIcon(this); - QString toolTip = tr("PIVX Core client") + " " + networkStyle->getTitleAddText(); + QString toolTip = tr("%1 client").arg(PACKAGE_NAME) + " " + networkStyle->getTitleAddText(); trayIcon->setToolTip(toolTip); trayIcon->setIcon(networkStyle->getAppIcon()); trayIcon->hide(); @@ -375,7 +375,7 @@ void PIVXGUI::messageInfo(const QString& text) void PIVXGUI::message(const QString& title, const QString& message, unsigned int style, bool* ret) { - QString strTitle = tr("PIVX Core"); // default title + QString strTitle = QString{PACKAGE_NAME}; // default title // Default to information icon int nNotifyIcon = Notificator::Information; @@ -444,7 +444,7 @@ bool PIVXGUI::openStandardDialog(QString title, QString body, QString okBtn, QSt } else { dialog = new DefaultDialog(); dialog->setText(title, body, okBtn); - dialog->setWindowTitle(tr("PIVX Core")); + dialog->setWindowTitle(PACKAGE_NAME); dialog->adjustSize(); dialog->raise(); dialog->exec(); diff --git a/src/qt/pivx/receivedialog.cpp b/src/qt/pivx/receivedialog.cpp index c0d9258f2d2c..d22ef2321def 100644 --- a/src/qt/pivx/receivedialog.cpp +++ b/src/qt/pivx/receivedialog.cpp @@ -5,8 +5,9 @@ #include "qt/pivx/receivedialog.h" #include "qt/pivx/forms/ui_receivedialog.h" #include "qt/pivx/qtutils.h" -#include "walletmodel.h" -#include +#include "qt/walletmodel.h" + +#include ReceiveDialog::ReceiveDialog(QWidget *parent) : FocusedDialog(parent), @@ -45,7 +46,7 @@ ReceiveDialog::ReceiveDialog(QWidget *parent) : connect(ui->btnSave, &QPushButton::clicked, this, &ReceiveDialog::onCopy); } -void ReceiveDialog::updateQr(QString address) +void ReceiveDialog::updateQr(const QString& address) { if (!info) info = new SendCoinsRecipient(); info->address = address; @@ -55,8 +56,7 @@ void ReceiveDialog::updateQr(QString address) QString error; QPixmap pixmap = encodeToQr(uri, error); if (!pixmap.isNull()) { - qrImage = &pixmap; - ui->labelQrImg->setPixmap(qrImage->scaled(ui->labelQrImg->width(), ui->labelQrImg->height())); + ui->labelQrImg->setPixmap(pixmap.scaled(ui->labelQrImg->width(), ui->labelQrImg->height())); } else { ui->labelQrImg->setText(!error.isEmpty() ? error : "Error encoding address"); } diff --git a/src/qt/pivx/receivedialog.h b/src/qt/pivx/receivedialog.h index 5b2e1600ee6f..4621ca34e991 100644 --- a/src/qt/pivx/receivedialog.h +++ b/src/qt/pivx/receivedialog.h @@ -6,7 +6,6 @@ #define RECEIVEDIALOG_H #include "qt/pivx/focuseddialog.h" -#include class SendCoinsRecipient; @@ -22,13 +21,12 @@ class ReceiveDialog : public FocusedDialog explicit ReceiveDialog(QWidget *parent = nullptr); ~ReceiveDialog(); - void updateQr(QString address); + void updateQr(const QString& address); private Q_SLOTS: void onCopy(); private: Ui::ReceiveDialog *ui{nullptr}; - QPixmap *qrImage{nullptr}; SendCoinsRecipient *info{nullptr}; }; diff --git a/src/qt/pivx/receivewidget.cpp b/src/qt/pivx/receivewidget.cpp index 220c0eb2497c..14e21ac1d99e 100644 --- a/src/qt/pivx/receivewidget.cpp +++ b/src/qt/pivx/receivewidget.cpp @@ -8,7 +8,6 @@ #include "qt/pivx/addnewcontactdialog.h" #include "qt/pivx/qtutils.h" #include "qt/pivx/myaddressrow.h" -#include "qt/pivx/furlistrow.h" #include "qt/pivx/addressholder.h" #include "walletmodel.h" #include "guiutil.h" @@ -145,11 +144,10 @@ void ReceiveWidget::refreshView(const QModelIndex& tl, const QModelIndex& br) return refreshView(index.data(Qt::DisplayRole).toString()); } -void ReceiveWidget::refreshView(QString refreshAddress) +void ReceiveWidget::refreshView(const QString& refreshAddress) { try { - QString latestAddress = (refreshAddress.isEmpty()) ? this->addressTableModel->getAddressToShow(shieldedMode) : refreshAddress; - + const QString& latestAddress = (refreshAddress.isEmpty()) ? addressTableModel->getAddressToShow(shieldedMode) : refreshAddress; if (latestAddress.isEmpty()) { // Check for generation errors ui->labelQrImg->setText(tr("No available address\ntry unlocking the wallet")); @@ -189,7 +187,7 @@ void ReceiveWidget::updateLabel() } } -void ReceiveWidget::updateQr(QString& address) +void ReceiveWidget::updateQr(const QString& address) { info->address = address; QString uri = GUIUtil::formatBitcoinURI(*info); @@ -199,8 +197,7 @@ void ReceiveWidget::updateQr(QString& address) QColor qrColor("#382d4d"); QPixmap pixmap = encodeToQr(uri, error, qrColor); if (!pixmap.isNull()) { - qrImage = &pixmap; - ui->labelQrImg->setPixmap(qrImage->scaled(ui->labelQrImg->width(), ui->labelQrImg->height())); + ui->labelQrImg->setPixmap(pixmap.scaled(ui->labelQrImg->width(), ui->labelQrImg->height())); } else { ui->labelQrImg->setText(!error.isEmpty() ? error : "Error encoding address"); } @@ -236,6 +233,7 @@ void ReceiveWidget::onLabelClicked() inform(tr("Error storing address label")); } } + dialog->deleteLater(); isShowingDialog = false; } } diff --git a/src/qt/pivx/receivewidget.h b/src/qt/pivx/receivewidget.h index 38a6de14d2c3..f355aeae8c54 100644 --- a/src/qt/pivx/receivewidget.h +++ b/src/qt/pivx/receivewidget.h @@ -45,7 +45,7 @@ private Q_SLOTS: void onLabelClicked(); void onCopyClicked(); void refreshView(const QModelIndex& tl, const QModelIndex& br); - void refreshView(QString refreshAddress = QString()); + void refreshView(const QString& refreshAddress = QString()); void handleAddressClicked(const QModelIndex &index); void onSortChanged(int idx); void onSortOrderChanged(int idx); @@ -62,14 +62,12 @@ private Q_SLOTS: // Cached last address SendCoinsRecipient *info{nullptr}; - // Cached qr - QPixmap *qrImage{nullptr}; // Cached sort type and order AddressTableModel::ColumnIndex sortType = AddressTableModel::Label; Qt::SortOrder sortOrder = Qt::AscendingOrder; - void updateQr(QString& address); + void updateQr(const QString& address); void updateLabel(); void showAddressGenerationDialog(bool isPaymentRequest); void sortAddresses(); diff --git a/src/qt/pivx/requestdialog.cpp b/src/qt/pivx/requestdialog.cpp index 31196111824d..1805d673ade3 100644 --- a/src/qt/pivx/requestdialog.cpp +++ b/src/qt/pivx/requestdialog.cpp @@ -162,21 +162,20 @@ void RequestDialog::showEvent(QShowEvent *event) if (ui->lineEditAmount) ui->lineEditAmount->setFocus(); } -void RequestDialog::updateQr(QString str) +void RequestDialog::updateQr(const QString& str) { QString uri = GUIUtil::formatBitcoinURI(*info); ui->labelQrImg->setText(""); QString error; QPixmap pixmap = encodeToQr(uri, error); if (!pixmap.isNull()) { - qrImage = &pixmap; - ui->labelQrImg->setPixmap(qrImage->scaled(ui->labelQrImg->width(), ui->labelQrImg->height())); + ui->labelQrImg->setPixmap(pixmap.scaled(ui->labelQrImg->width(), ui->labelQrImg->height())); } else { ui->labelQrImg->setText(!error.isEmpty() ? error : "Error encoding address"); } } -void RequestDialog::inform(QString text) +void RequestDialog::inform(const QString& text) { if (!snackBar) snackBar = new SnackBar(nullptr, this); diff --git a/src/qt/pivx/requestdialog.h b/src/qt/pivx/requestdialog.h index 2dbf23e1d825..b9e8a0722bf3 100644 --- a/src/qt/pivx/requestdialog.h +++ b/src/qt/pivx/requestdialog.h @@ -45,10 +45,8 @@ private Q_SLOTS: // Cached last address SendCoinsRecipient *info{nullptr}; - QPixmap *qrImage{nullptr}; - - void updateQr(QString str); - void inform(QString text); + void updateQr(const QString& str); + void inform(const QString& text); }; #endif // REQUESTDIALOG_H diff --git a/src/qt/pivx/settings/settingsfaqwidget.cpp b/src/qt/pivx/settings/settingsfaqwidget.cpp index d580b8f8d634..e7efd7c268c9 100644 --- a/src/qt/pivx/settings/settingsfaqwidget.cpp +++ b/src/qt/pivx/settings/settingsfaqwidget.cpp @@ -2,6 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "qt/pivx/settings/settingsfaqwidget.h" #include "qt/pivx/settings/forms/ui_settingsfaqwidget.h" #include "clientmodel.h" @@ -115,10 +119,11 @@ SettingsFaqWidget::SettingsFaqWidget(PIVXGUI* parent, ClientModel* _model) : QString masternodeContent = formatFAQContent( formatFAQParagraph( - tr("A masternode is a computer running a full node PIVX core wallet with a " - "requirement of %1 secured collateral to provide extra services " + tr("A masternode is a computer running a full node %1 wallet with a " + "requirement of %2 secured collateral to provide extra services " "to the network and in return, receive a portion of the block reward " "regularly. These services include:") + .arg(PACKAGE_NAME) .arg(GUIUtil::formatBalance(clientModel->getMNCollateralRequiredAmount(), BitcoinUnits::PIV)) + formatFAQUnorderedList( formatFAQListItem(tr("A decentralized governance (Proposal Voting)")) + diff --git a/src/qt/pivx/settings/settingsmainoptionswidget.cpp b/src/qt/pivx/settings/settingsmainoptionswidget.cpp index f86bfcf46831..31548a5c27b6 100644 --- a/src/qt/pivx/settings/settingsmainoptionswidget.cpp +++ b/src/qt/pivx/settings/settingsmainoptionswidget.cpp @@ -51,7 +51,7 @@ SettingsMainOptionsWidget::SettingsMainOptionsWidget(PIVXGUI* _window, QWidget * setCssProperty({ui->labelTitleSizeDb, ui->labelTitleThreads}, "text-main-settings"); // Switch - ui->pushSwitchStart->setText(tr("Start PIVX on system login")); + ui->pushSwitchStart->setText(tr("Start %1 on system login").arg(PACKAGE_NAME)); ui->pushSwitchStart->setProperty("cssClass", "btn-switch"); #ifdef Q_OS_MAC diff --git a/src/qt/pivx/splash.cpp b/src/qt/pivx/splash.cpp index fa07fe393117..c344145429ca 100644 --- a/src/qt/pivx/splash.cpp +++ b/src/qt/pivx/splash.cpp @@ -2,6 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "qt/pivx/splash.h" #include "qt/pivx/forms/ui_splash.h" #include "QFile" @@ -28,7 +32,7 @@ Splash::Splash(const NetworkStyle* networkStyle) : QWidget(nullptr), ui(new Ui::Splash) { ui->setupUi(this); - QString titleText = tr("PIVX Core"); + QString titleText = PACKAGE_NAME; QString titleAddText = networkStyle->getTitleAddText(); setWindowTitle(titleText + " " + titleAddText); diff --git a/src/qt/pivx/welcomecontentwidget.cpp b/src/qt/pivx/welcomecontentwidget.cpp index 8bf78ea26ba5..70fcf911c1dd 100644 --- a/src/qt/pivx/welcomecontentwidget.cpp +++ b/src/qt/pivx/welcomecontentwidget.cpp @@ -2,6 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "qt/pivx/welcomecontentwidget.h" #include "qt/pivx/forms/ui_welcomecontentwidget.h" @@ -104,6 +108,7 @@ WelcomeContentWidget::WelcomeContentWidget(QWidget *parent) : // Frame 2 ui->page_2->setProperty("cssClass", "container-welcome-step2"); ui->labelTitle2->setProperty("cssClass", "text-title-welcome"); + ui->labelTitle2->setText(ui->labelTitle2->text().arg(PACKAGE_NAME)); ui->labelMessage2->setProperty("cssClass", "text-main-white"); // Frame 3 diff --git a/src/qt/pivxstrings.cpp b/src/qt/pivxstrings.cpp index 137bdb4257e3..9a50ecd89395 100644 --- a/src/qt/pivxstrings.cpp +++ b/src/qt/pivxstrings.cpp @@ -10,26 +10,6 @@ #endif static const char UNUSED *pivx_strings[] = { QT_TRANSLATE_NOOP("pivx-core", "" -"(1 = keep tx meta data e.g. payment request information, 2 = drop tx meta " -"data)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Accept connections from outside (default: %u if no -proxy or -connect/-" -"noconnect)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Allow JSON-RPC connections from specified source. Valid for are a " -"single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or " -"a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Bind to given address and always listen on it. Use [host]:port notation for " -"IPv6"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Bind to given address and whitelist peers connecting to it. Use [host]:port " -"notation for IPv6"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Bind to given address to listen for JSON-RPC connections. Use [host]:port " -"notation for IPv6. This option can be specified multiple times (default: " -"bind to all interfaces)"), -QT_TRANSLATE_NOOP("pivx-core", "" "Cannot find the Sapling parameters in the following directory:\n" "%s\n" "Please run 'sapling-fetch-params' or './util/fetch-params.sh' and then " @@ -43,84 +23,25 @@ QT_TRANSLATE_NOOP("pivx-core", "" "Cannot upgrade to Sapling wallet (already running Sapling support). Version: " "%d"), QT_TRANSLATE_NOOP("pivx-core", "" -"Change automatic finalized budget voting behavior. mode=auto: Vote for only " -"exact finalized budget match to my generated budget. (string, default: auto)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Connect only to the specified node(s); -noconnect or -connect=0 alone to " -"disable automatic connections"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Continuously rate-limit free transactions to *1000 bytes per minute " -"(default:%u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Create new files with system default permissions, instead of umask 077 (only " -"effective with disabled wallet functionality)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Delete all wallet transactions and only recover those parts of the " -"blockchain through -rescan on startup"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Disable all PIVX specific functionality (Masternodes, Budgeting) (0-1, " -"default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" "Distributed under the MIT software license, see the accompanying file " "COPYING or ."), QT_TRANSLATE_NOOP("pivx-core", "" -"Do not accept transactions if any ancestor would have or more in-mempool " -"descendants (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Do not accept transactions if any ancestor would have more than " -"kilobytes of in-mempool descendants (default: %u)."), -QT_TRANSLATE_NOOP("pivx-core", "" -"Do not accept transactions if number of in-mempool ancestors is or more " -"(default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Do not accept transactions whose size with all in-mempool ancestors exceeds " -" kilobytes (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Do not keep transactions in the mempool longer than hours (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Enable cold staking functionality (0-1, default: %u). Disabled if staking=0"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Enable spork administration functionality with the appropriate private key."), -QT_TRANSLATE_NOOP("pivx-core", "" "Enabling Masternode support requires turning on transaction indexing.Please " "add %s to your configuration and start with %s"), QT_TRANSLATE_NOOP("pivx-core", "" -"Error loading wallet %s. %s parameter must only specify a filename (not a " -"path)."), -QT_TRANSLATE_NOOP("pivx-core", "" "Error: Listening for incoming connections failed (listen returned error %s)"), QT_TRANSLATE_NOOP("pivx-core", "" "Error: Unsupported argument %s found. Setting SOCKS version isn't possible " "anymore, only SOCKS5 proxies are supported."), QT_TRANSLATE_NOOP("pivx-core", "" -"Exclude debugging information for a category. Can be used in conjunction " -"with -debug=1 to output debug logs for all categories except one or more " -"specified categories."), -QT_TRANSLATE_NOOP("pivx-core", "" -"Execute command when a relevant alert is received or we see a really long " -"fork (%s in cmd is replaced by message)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Execute command when a wallet transaction changes (%s in cmd is replaced by " -"TxID)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Execute command when the best block changes (%s in cmd is replaced by block " -"hash)"), -QT_TRANSLATE_NOOP("pivx-core", "" "Failed to create backup, file already exists! This could happen if you " "restarted wallet in less than 60 seconds. You can continue if you are ok " "with this."), QT_TRANSLATE_NOOP("pivx-core", "" -"Fees (in %s/Kb) smaller than this are considered zero fee for relaying, " -"mining and transaction creation (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Fees (in %s/Kb) smaller than this are considered zero fee for transaction " -"creation (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Flush database activity from memory pool to disk log every megabytes " -"(default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"If paytxfee is not set, include enough fee so transactions begin " -"confirmation on average within n blocks (default: %u)"), +"Invalid -wallet path '%s'. -wallet path should point to a directory where " +"wallet.dat and database/log.?????????? files can be stored, a location where " +"such a directory could be created or (for backwards compatibility) the name " +"of an existing data file in -walletdir (%s)"), QT_TRANSLATE_NOOP("pivx-core", "" "Invalid amount for %s: '%s' (must be at least the minimum relay fee of %s to " "prevent stuck transactions)"), @@ -128,64 +49,8 @@ QT_TRANSLATE_NOOP("pivx-core", "" "Legacy masternode system disabled. Use %s to start as deterministic " "masternode"), QT_TRANSLATE_NOOP("pivx-core", "" -"Log transaction priority and fee per kB when mining blocks (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Maintain a full transaction index, used by the getrawtransaction rpc call " -"(default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Maximum average size of an index occurrence in the block spam filter " -"(default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Maximum size of data in data carrier transactions we relay and mine " -"(default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Maximum size of the list of indexes in the block spam filter (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Maximum total fees to use in a single wallet transaction, setting too low " -"may abort large transactions (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Minimum positive amount (in PIV) allowed by GUI and RPC for the stake split " -"threshold (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Output debugging information (default: %u, supplying is optional)"), -QT_TRANSLATE_NOOP("pivx-core", "" "Please check that your computer's date and time are correct! If your clock " -"is wrong PIVX Core will not work properly."), -QT_TRANSLATE_NOOP("pivx-core", "" -"Query for peer addresses via DNS lookup, if low on addresses (default: 1 " -"unless -connect/-noconnect)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Randomize credentials for every proxy connection. This enables Tor stream " -"isolation (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Require high priority for relaying free or low-fee transactions (default:%u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Send trace/debug info to console instead of debug.log file (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Set the masternode operator private key. Only valid with -masternode=1. When " -"set, the masternode acts as a deterministic masternode."), -QT_TRANSLATE_NOOP("pivx-core", "" -"Set the number of script verification threads (%u to %d, 0 = auto, <0 = " -"leave that many cores free, default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Set the number of threads for coin generation if enabled (-1 = all cores, " -"default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Specify custom backup path to add a copy of any wallet backup. If set as " -"dir, every backup generates a timestamped file. If set as file, will rewrite " -"to that file every backup."), -QT_TRANSLATE_NOOP("pivx-core", "" -"Specify directory to hold blocks subdirectory for *.dat files (default: " -")"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Specify location of debug log file: this can be an absolute path or a path " -"relative to the data directory (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Support filtering of blocks and transaction with bloom filters (default: %u)"), +"is wrong %s will not work properly."), QT_TRANSLATE_NOOP("pivx-core", "" "System error while flushing the chainstate after pruning invalid entries. " "Possible corrupt database."), @@ -204,19 +69,8 @@ QT_TRANSLATE_NOOP("pivx-core", "" "Total length of network version string (%i) exceeds maximum length (%i). " "Reduce the number or size of %s."), QT_TRANSLATE_NOOP("pivx-core", "" -"Unable to bind to %s on this computer. PIVX Core is probably already running."), -QT_TRANSLATE_NOOP("pivx-core", "" "Unable to replay blocks. You will need to rebuild the database using %s."), QT_TRANSLATE_NOOP("pivx-core", "" -"Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: " -"%s)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Username and hashed password for JSON-RPC connections. The field " -"comes in the format: :$. A canonical python script is " -"included in share/rpcuser. The client then connects normally using the " -"rpcuser=/rpcpassword= pair of arguments. This option can " -"be specified multiple times"), -QT_TRANSLATE_NOOP("pivx-core", "" "WARNING: The transaction has been signed and recorded, so the wallet will " "try to re-send it. Use 'abandontransaction' to cancel it. (txid: %s)"), QT_TRANSLATE_NOOP("pivx-core", "" @@ -227,7 +81,7 @@ QT_TRANSLATE_NOOP("pivx-core", "" "you send a transaction."), QT_TRANSLATE_NOOP("pivx-core", "" "Warning: Please check that your computer's date and time are correct! If " -"your clock is wrong PIVX Core will not work properly."), +"your clock is wrong %s will not work properly."), QT_TRANSLATE_NOOP("pivx-core", "" "Warning: The network does not appear to fully agree! Some miners appear to " "be experiencing issues."), @@ -242,78 +96,41 @@ QT_TRANSLATE_NOOP("pivx-core", "" "Warning: error reading %s! All keys read correctly, but transaction data or " "address book entries might be missing or incorrect."), QT_TRANSLATE_NOOP("pivx-core", "" -"Whether to save the mempool on shutdown and load on restart (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "" -"Whitelist peers connecting from the given netmask or IP address. Can be " -"specified multiple times."), -QT_TRANSLATE_NOOP("pivx-core", "" -"Whitelisted peers cannot be DoS banned and their transactions are always " -"relayed, even if they are already in the mempool, useful e.g. for a gateway"), -QT_TRANSLATE_NOOP("pivx-core", "" "\"local\" vote is no longer available with DMNs. Use \"alias\" from the " "wallet with the voting key."), QT_TRANSLATE_NOOP("pivx-core", "%s Invalid %s address or hostname: '%s'"), QT_TRANSLATE_NOOP("pivx-core", "%s corrupt, salvage failed"), QT_TRANSLATE_NOOP("pivx-core", "%s is not allowed in combination with enabled wallet functionality"), QT_TRANSLATE_NOOP("pivx-core", "%s is only allowed with a single wallet file"), -QT_TRANSLATE_NOOP("pivx-core", "(default: %s)"), QT_TRANSLATE_NOOP("pivx-core", "(must be %d for %s-net)"), -QT_TRANSLATE_NOOP("pivx-core", " can be:"), QT_TRANSLATE_NOOP("pivx-core", "A fatal internal error occurred, see debug.log for details"), -QT_TRANSLATE_NOOP("pivx-core", "Accept command line and JSON-RPC commands"), -QT_TRANSLATE_NOOP("pivx-core", "Accept public REST requests (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Active Masternode not initialized."), -QT_TRANSLATE_NOOP("pivx-core", "Add a node to connect to and attempt to keep the connection open"), -QT_TRANSLATE_NOOP("pivx-core", "Allow DNS lookups for -addnode, -seednode and -connect (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Allows deprecated RPC method(s) to be used"), -QT_TRANSLATE_NOOP("pivx-core", "Always query for peer addresses via DNS lookup (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Append comment to the user agent string"), -QT_TRANSLATE_NOOP("pivx-core", "Attempt to force blockchain corruption recovery"), -QT_TRANSLATE_NOOP("pivx-core", "Attempt to recover private keys from a corrupt wallet file"), -QT_TRANSLATE_NOOP("pivx-core", "Automatically create Tor hidden service (default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "Block creation options:"), QT_TRANSLATE_NOOP("pivx-core", "Calculating money supply..."), QT_TRANSLATE_NOOP("pivx-core", "Can't generate a change-address key. Please call keypoolrefill first."), QT_TRANSLATE_NOOP("pivx-core", "Cannot downgrade wallet."), QT_TRANSLATE_NOOP("pivx-core", "Cannot resolve -%s address: '%s'"), QT_TRANSLATE_NOOP("pivx-core", "Cannot set %s or %s together with %s"), QT_TRANSLATE_NOOP("pivx-core", "Cannot upgrade a locked wallet."), -QT_TRANSLATE_NOOP("pivx-core", "Chain selection options:"), QT_TRANSLATE_NOOP("pivx-core", "Change index out of range"), -QT_TRANSLATE_NOOP("pivx-core", "Connect through SOCKS5 proxy"), -QT_TRANSLATE_NOOP("pivx-core", "Connect to a node to retrieve peer addresses, and disconnect"), -QT_TRANSLATE_NOOP("pivx-core", "Connection options:"), QT_TRANSLATE_NOOP("pivx-core", "Copyright (C) 2009-%i The Bitcoin Core Developers"), QT_TRANSLATE_NOOP("pivx-core", "Copyright (C) 2014-%i The Dash Core Developers"), -QT_TRANSLATE_NOOP("pivx-core", "Copyright (C) 2015-%i The PIVX Core Developers"), +QT_TRANSLATE_NOOP("pivx-core", "Copyright (C) 2015-%i The %s Developers"), QT_TRANSLATE_NOOP("pivx-core", "Corrupted block database detected"), +QT_TRANSLATE_NOOP("pivx-core", "Could not find asmap file %s"), QT_TRANSLATE_NOOP("pivx-core", "Could not open debug log file %s"), +QT_TRANSLATE_NOOP("pivx-core", "Could not parse asmap file %s"), QT_TRANSLATE_NOOP("pivx-core", "Could not parse masternode.conf"), -QT_TRANSLATE_NOOP("pivx-core", "Debugging/Testing options:"), -QT_TRANSLATE_NOOP("pivx-core", "Delete blockchain folders and resync from scratch"), QT_TRANSLATE_NOOP("pivx-core", "Deterministic masternodes are not enforced yet"), -QT_TRANSLATE_NOOP("pivx-core", "Disable OS notifications for incoming transactions (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Discover own IP address (default: 1 when listening and no -externalip)"), -QT_TRANSLATE_NOOP("pivx-core", "Display verbose coin stake messages in the debug.log file."), -QT_TRANSLATE_NOOP("pivx-core", "Do not load the wallet and disable wallet RPC calls (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Do you want to rebuild the block database now?"), QT_TRANSLATE_NOOP("pivx-core", "Done loading"), QT_TRANSLATE_NOOP("pivx-core", "Elliptic curve cryptography sanity check failure. Aborting."), -QT_TRANSLATE_NOOP("pivx-core", "Enable publish hash block in
"), -QT_TRANSLATE_NOOP("pivx-core", "Enable publish hash transaction in
"), -QT_TRANSLATE_NOOP("pivx-core", "Enable publish raw block in
"), -QT_TRANSLATE_NOOP("pivx-core", "Enable publish raw transaction in
"), -QT_TRANSLATE_NOOP("pivx-core", "Enable staking functionality (0-1, default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Enable the client to act as a masternode (0-1, default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Error initializing block database"), QT_TRANSLATE_NOOP("pivx-core", "Error initializing wallet database environment %s!"), QT_TRANSLATE_NOOP("pivx-core", "Error loading %s: Wallet corrupted"), -QT_TRANSLATE_NOOP("pivx-core", "Error loading %s: Wallet requires newer version of PIVX Core"), +QT_TRANSLATE_NOOP("pivx-core", "Error loading %s: Wallet requires newer version of %s"), QT_TRANSLATE_NOOP("pivx-core", "Error loading %s\n"), QT_TRANSLATE_NOOP("pivx-core", "Error loading block database"), -QT_TRANSLATE_NOOP("pivx-core", "Error loading wallet %s. %s filename must be a regular file."), QT_TRANSLATE_NOOP("pivx-core", "Error loading wallet %s. Duplicate %s filename specified."), -QT_TRANSLATE_NOOP("pivx-core", "Error loading wallet %s. Invalid characters in %s filename."), QT_TRANSLATE_NOOP("pivx-core", "Error opening block database"), QT_TRANSLATE_NOOP("pivx-core", "Error reading from database, shutting down."), QT_TRANSLATE_NOOP("pivx-core", "Error upgrading chainstate database"), @@ -328,19 +145,11 @@ QT_TRANSLATE_NOOP("pivx-core", "Error: Initializing networking failed"), QT_TRANSLATE_NOOP("pivx-core", "Error: Unsupported argument %s found, use %s."), QT_TRANSLATE_NOOP("pivx-core", "Error: Unsupported argument %s found. Checklevel must be level 4."), QT_TRANSLATE_NOOP("pivx-core", "Failed to accept tx in the memory pool (reason: %s)\n"), -QT_TRANSLATE_NOOP("pivx-core", "Failed to create backup, error: %s"), QT_TRANSLATE_NOOP("pivx-core", "Failed to delete backup, error: %s"), QT_TRANSLATE_NOOP("pivx-core", "Failed to listen on any port. Use %s if you want this."), QT_TRANSLATE_NOOP("pivx-core", "Failed to parse host:port string"), QT_TRANSLATE_NOOP("pivx-core", "Failed to rescan the wallet during initialization"), -QT_TRANSLATE_NOOP("pivx-core", "Fee (in %s/kB) to add to transactions you send (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "Force safe mode (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Generate coins (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "How many blocks to check at startup (default: %u, 0 = all)"), -QT_TRANSLATE_NOOP("pivx-core", "If is not supplied, output all debugging information."), QT_TRANSLATE_NOOP("pivx-core", "Importing..."), -QT_TRANSLATE_NOOP("pivx-core", "Imports blocks from external blk000??.dat file"), -QT_TRANSLATE_NOOP("pivx-core", "Include IP addresses in debug output (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Incorrect or no genesis block found. Wrong datadir for network?"), QT_TRANSLATE_NOOP("pivx-core", "Information"), QT_TRANSLATE_NOOP("pivx-core", "Initialization sanity check failed. %s is shutting down."), @@ -357,14 +166,9 @@ QT_TRANSLATE_NOOP("pivx-core", "Invalid netmask specified in %s: '%s'"), QT_TRANSLATE_NOOP("pivx-core", "Invalid network upgrade (%s)"), QT_TRANSLATE_NOOP("pivx-core", "Invalid port %d detected in masternode.conf"), QT_TRANSLATE_NOOP("pivx-core", "Invalid status error."), -QT_TRANSLATE_NOOP("pivx-core", "Keep at most unconnectable transactions in memory (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Keep the transaction memory pool below megabytes (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Keypool ran out, please call keypoolrefill first, or unlock the wallet."), QT_TRANSLATE_NOOP("pivx-core", "Legacy Masternode is obsolete."), -QT_TRANSLATE_NOOP("pivx-core", "Limit size of signature cache to MiB (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Line: %d"), -QT_TRANSLATE_NOOP("pivx-core", "Listen for JSON-RPC connections on (default: %u or testnet: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Listen for connections on (default: %u or testnet: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Loading addresses..."), QT_TRANSLATE_NOOP("pivx-core", "Loading banlist..."), QT_TRANSLATE_NOOP("pivx-core", "Loading block index..."), @@ -374,68 +178,24 @@ QT_TRANSLATE_NOOP("pivx-core", "Loading masternode payment cache..."), QT_TRANSLATE_NOOP("pivx-core", "Loading sporks..."), QT_TRANSLATE_NOOP("pivx-core", "Loading wallet..."), QT_TRANSLATE_NOOP("pivx-core", "Loading/Pruning invalid outputs..."), -QT_TRANSLATE_NOOP("pivx-core", "Location of the auth cookie (default: data dir)"), -QT_TRANSLATE_NOOP("pivx-core", "Lock masternodes from masternode configuration file (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "MNs synchronization pending..."), -QT_TRANSLATE_NOOP("pivx-core", "Maintain at most connections to peers (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Masternode options:"), -QT_TRANSLATE_NOOP("pivx-core", "Maximum per-connection receive buffer, *1000 bytes (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Maximum per-connection send buffer, *1000 bytes (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Mining/Staking options:"), QT_TRANSLATE_NOOP("pivx-core", "Need to specify a port with %s: '%s'"), QT_TRANSLATE_NOOP("pivx-core", "Network upgrade parameters malformed, expecting %s"), QT_TRANSLATE_NOOP("pivx-core", "Network upgrade parameters may only be overridden on regtest."), QT_TRANSLATE_NOOP("pivx-core", "No error"), -QT_TRANSLATE_NOOP("pivx-core", "Node relay options:"), QT_TRANSLATE_NOOP("pivx-core", "Not enough file descriptors available."), -QT_TRANSLATE_NOOP("pivx-core", "Number of automatic wallet backups (default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "Number of custom location backups to retain (default: %d)"), QT_TRANSLATE_NOOP("pivx-core", "OS cryptographic RNG sanity check failure. Aborting."), -QT_TRANSLATE_NOOP("pivx-core", "On first run, create a legacy wallet instead of a HD wallet"), -QT_TRANSLATE_NOOP("pivx-core", "Only accept block chain matching built-in checkpoints (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Only connect to nodes in network (ipv4, ipv6 or onion)"), -QT_TRANSLATE_NOOP("pivx-core", "Options:"), -QT_TRANSLATE_NOOP("pivx-core", "Password for JSON-RPC connections"), QT_TRANSLATE_NOOP("pivx-core", "Peers are being disconnected due time differences."), QT_TRANSLATE_NOOP("pivx-core", "Preparing for resync..."), -QT_TRANSLATE_NOOP("pivx-core", "Prepend debug output with timestamp (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Print version and exit"), -QT_TRANSLATE_NOOP("pivx-core", "RPC server options:"), -QT_TRANSLATE_NOOP("pivx-core", "Randomly drop 1 of every network messages"), -QT_TRANSLATE_NOOP("pivx-core", "Randomly fuzz 1 of every network messages"), QT_TRANSLATE_NOOP("pivx-core", "Reaccepting wallet transactions..."), -QT_TRANSLATE_NOOP("pivx-core", "Rebuild block chain index from current blk000??.dat files"), -QT_TRANSLATE_NOOP("pivx-core", "Relay and mine data carrier transactions (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Relay non-P2SH multisig (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Replaying blocks..."), -QT_TRANSLATE_NOOP("pivx-core", "Rescan the block chain for missing wallet transactions"), QT_TRANSLATE_NOOP("pivx-core", "Rescanning..."), -QT_TRANSLATE_NOOP("pivx-core", "Run a thread to flush wallet periodically (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Run in the background as a daemon and accept commands"), -QT_TRANSLATE_NOOP("pivx-core", "Set database cache size in megabytes (%d to %d, default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "Set external address:port to get to this masternode (example: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "Set key pool size to (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Set maximum block size in bytes (default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "Set minimum block size in bytes (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Set the Maximum reorg depth (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Set the masternode private key"), -QT_TRANSLATE_NOOP("pivx-core", "Set the number of threads to service RPC calls (default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Show all debugging options (usage: --help -help-debug)"), -QT_TRANSLATE_NOOP("pivx-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"), QT_TRANSLATE_NOOP("pivx-core", "Shutdown requested over the txs scan. Exiting."), QT_TRANSLATE_NOOP("pivx-core", "Signing transaction failed"), +QT_TRANSLATE_NOOP("pivx-core", "Specified -walletdir \"%s\" does not exist"), +QT_TRANSLATE_NOOP("pivx-core", "Specified -walletdir \"%s\" is a relative path"), +QT_TRANSLATE_NOOP("pivx-core", "Specified -walletdir \"%s\" is not a directory"), QT_TRANSLATE_NOOP("pivx-core", "Specified blocks directory \"%s\" does not exist.\n"), -QT_TRANSLATE_NOOP("pivx-core", "Specify configuration file (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "Specify connection timeout in milliseconds (minimum: 1, default: %d)"), -QT_TRANSLATE_NOOP("pivx-core", "Specify data directory"), -QT_TRANSLATE_NOOP("pivx-core", "Specify masternode configuration file (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "Specify pid file (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "Specify wallet file (within data directory)"), -QT_TRANSLATE_NOOP("pivx-core", "Specify your own public address"), -QT_TRANSLATE_NOOP("pivx-core", "Specify zk params directory (default: %s)"), -QT_TRANSLATE_NOOP("pivx-core", "Spend unconfirmed change when sending transactions (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Stop running after importing blocks from disk (default: %u)"), QT_TRANSLATE_NOOP("pivx-core", "Synchronization failed"), QT_TRANSLATE_NOOP("pivx-core", "Synchronization finished"), QT_TRANSLATE_NOOP("pivx-core", "Synchronizing budgets..."), @@ -443,15 +203,11 @@ QT_TRANSLATE_NOOP("pivx-core", "Synchronizing masternode winners..."), QT_TRANSLATE_NOOP("pivx-core", "Synchronizing masternodes..."), QT_TRANSLATE_NOOP("pivx-core", "Synchronizing sporks..."), QT_TRANSLATE_NOOP("pivx-core", "The threshold value cannot be less than %s"), -QT_TRANSLATE_NOOP("pivx-core", "This help message"), QT_TRANSLATE_NOOP("pivx-core", "This is experimental software."), QT_TRANSLATE_NOOP("pivx-core", "This is not a deterministic masternode. 'local' option disabled."), QT_TRANSLATE_NOOP("pivx-core", "This is not a masternode. 'local' option disabled."), QT_TRANSLATE_NOOP("pivx-core", "This is not a masternode."), QT_TRANSLATE_NOOP("pivx-core", "This product includes UPnP software written by Thomas Bernard."), -QT_TRANSLATE_NOOP("pivx-core", "Threshold for disconnecting misbehaving peers (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Tor control port password (default: empty)"), -QT_TRANSLATE_NOOP("pivx-core", "Tor control port to use if onion listening enabled (default: %s)"), QT_TRANSLATE_NOOP("pivx-core", "Transaction amount too small"), QT_TRANSLATE_NOOP("pivx-core", "Transaction amounts must be positive"), QT_TRANSLATE_NOOP("pivx-core", "Transaction canceled."), @@ -459,34 +215,24 @@ QT_TRANSLATE_NOOP("pivx-core", "Transaction must have at least one recipient"), QT_TRANSLATE_NOOP("pivx-core", "Transaction too large for fee policy"), QT_TRANSLATE_NOOP("pivx-core", "Transaction too large"), QT_TRANSLATE_NOOP("pivx-core", "Unable to bind to %s on this computer (bind returned error %s)"), +QT_TRANSLATE_NOOP("pivx-core", "Unable to bind to %s on this computer. %s is probably already running."), QT_TRANSLATE_NOOP("pivx-core", "Unable to generate initial key!"), QT_TRANSLATE_NOOP("pivx-core", "Unable to generate keys"), QT_TRANSLATE_NOOP("pivx-core", "Unable to sign spork message, wrong key?"), QT_TRANSLATE_NOOP("pivx-core", "Unable to start HTTP server. See debug log for details."), QT_TRANSLATE_NOOP("pivx-core", "Unknown network specified in %s: '%s'"), QT_TRANSLATE_NOOP("pivx-core", "Unsupported logging category %s=%s."), -QT_TRANSLATE_NOOP("pivx-core", "Upgrade wallet to latest format"), QT_TRANSLATE_NOOP("pivx-core", "Upgrading coins database if needed..."), -QT_TRANSLATE_NOOP("pivx-core", "Use UPnP to map the listening port (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Use block spam filter (default: %u)"), -QT_TRANSLATE_NOOP("pivx-core", "Use the test chain"), QT_TRANSLATE_NOOP("pivx-core", "User Agent comment (%s) contains unsafe characters."), -QT_TRANSLATE_NOOP("pivx-core", "Username for JSON-RPC connections"), QT_TRANSLATE_NOOP("pivx-core", "Verifying blocks..."), QT_TRANSLATE_NOOP("pivx-core", "Verifying wallet(s)..."), QT_TRANSLATE_NOOP("pivx-core", "Wallet %s resides outside data directory %s"), -QT_TRANSLATE_NOOP("pivx-core", "Wallet debugging/testing options:"), -QT_TRANSLATE_NOOP("pivx-core", "Wallet needed to be rewritten: restart PIVX Core to complete"), -QT_TRANSLATE_NOOP("pivx-core", "Wallet options:"), -QT_TRANSLATE_NOOP("pivx-core", "Wallet window title"), +QT_TRANSLATE_NOOP("pivx-core", "Wallet needed to be rewritten: restart %s to complete"), QT_TRANSLATE_NOOP("pivx-core", "Warning"), QT_TRANSLATE_NOOP("pivx-core", "Warning: This version is obsolete, upgrade required!"), QT_TRANSLATE_NOOP("pivx-core", "Warning: Unsupported argument %s ignored, use %s"), QT_TRANSLATE_NOOP("pivx-core", "Warning: Unsupported argument %s ignored, use %s."), -QT_TRANSLATE_NOOP("pivx-core", "Wasn't able to create wallet backup folder %s!"), QT_TRANSLATE_NOOP("pivx-core", "You can not start a masternode in litemode"), QT_TRANSLATE_NOOP("pivx-core", "You need to rebuild the database using %s to change %s"), QT_TRANSLATE_NOOP("pivx-core", "Zapping all transactions from wallet..."), -QT_TRANSLATE_NOOP("pivx-core", "ZeroMQ notification options:"), -QT_TRANSLATE_NOOP("pivx-core", "on startup"), }; diff --git a/src/qt/res/pivx-qt-res.rc b/src/qt/res/pivx-qt-res.rc index fee3145fd952..c77b702bca96 100755 --- a/src/qt/res/pivx-qt-res.rc +++ b/src/qt/res/pivx-qt-res.rc @@ -20,13 +20,13 @@ BEGIN BLOCK "040904E4" // U.S. English - multilingual (hex) BEGIN VALUE "CompanyName", "PIVX" - VALUE "FileDescription", "PIVX Core (OSS GUI client for PIVX)" + VALUE "FileDescription", PACKAGE_NAME " (OSS GUI client for PIVX)" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "pivx-qt" VALUE "LegalCopyright", COPYRIGHT_STR VALUE "LegalTrademarks1", "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php." VALUE "OriginalFilename", "pivx-qt.exe" - VALUE "ProductName", "PIVX Core" + VALUE "ProductName", PACKAGE_NAME VALUE "ProductVersion", VER_PRODUCTVERSION_STR END END diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 2c4e5e2af741..267649912f65 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -259,7 +259,6 @@ void RPCConsole::setClientModel(ClientModel* model) // Provide initial values ui->clientVersion->setText(model->formatFullVersion()); ui->clientName->setText(model->clientName()); - ui->buildDate->setText(model->formatBuildDate()); ui->dataDir->setText(model->dataDir()); ui->startupTime->setText(model->formatClientStartupTime()); ui->networkName->setText(QString::fromStdString(Params().NetworkIDString())); diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 250aecc4379d..3789f52a507d 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -104,9 +104,7 @@ class TransactionTablePriv // First check if the amount of txs exceeds the UI limit if (txesSize > MAX_AMOUNT_LOADED_RECORDS) { - // Sort the txs by date just to be really really sure that them are ordered. - // (this extra calculation should be removed in the future if can ensure that - // txs are stored in order in the db, which is what should be happening) + // Sort the txs by date sort(walletTxes.begin(), walletTxes.end(), [](const CWalletTx & a, const CWalletTx & b) -> bool { return a.GetTxTime() > b.GetTxTime(); @@ -153,6 +151,10 @@ class TransactionTablePriv nFirstLoadedTxTime = convertRes.nFirstLoadedTxTime; } } + + // Now that all records have been cached, sort them by tx hash + std::sort(cachedWallet.begin(), cachedWallet.end(), TxLessThan()); + } else { // Single thread flow ConvertTxToVectorResult convertRes = convertTxToRecords(wallet, walletTxes); diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index 6eea16dd421b..099ce20212d8 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -4,6 +4,10 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "utilitydialog.h" #include "ui_helpmessagedialog.h" @@ -34,7 +38,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about) : QDialog(pare if (parent) this->setStyleSheet(parent->styleSheet()); GUIUtil::restoreWindowGeometry("nHelpMessageDialogWindow", this->size(), this); - QString version = tr("PIVX Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()); + QString version = QString{PACKAGE_NAME} + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()); /* On x86 add a bit specifier to the version so that users can distinguish between * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious. */ @@ -47,7 +51,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about) : QDialog(pare setCssBtnPrimary(ui->pushButtonOk); connect(ui->pushButtonOk, &QPushButton::clicked, this, &HelpMessageDialog::close); if (about) { - setWindowTitle(tr("About PIVX Core")); + setWindowTitle(tr("About %1").arg(PACKAGE_NAME)); /// HTML-format the license message from the core QString licenseInfo = QString::fromStdString(LicenseInfo()); @@ -68,8 +72,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about) : QDialog(pare ui->helpMessage->setVisible(false); } else { setWindowTitle(tr("Command-line options")); - QString header = tr("Usage:") + "\n" + - " pivx-qt [" + tr("command-line options") + "] " + "\n"; + QString header = "Usage: pivx-qt [command-line options] \n"; QTextCursor cursor(ui->helpMessage->document()); cursor.insertText(version); cursor.insertBlock(); @@ -77,14 +80,14 @@ HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about) : QDialog(pare cursor.insertBlock(); std::string strUsage = HelpMessage(HMM_BITCOIN_QT); - strUsage += HelpMessageGroup(tr("UI Options:").toStdString()); - strUsage += HelpMessageOpt("-choosedatadir", strprintf(tr("Choose data directory on startup (default: %u)").toStdString(), DEFAULT_CHOOSE_DATADIR)); - strUsage += HelpMessageOpt("-lang=", tr("Set language, for example \"de_DE\" (default: system locale)").toStdString()); - strUsage += HelpMessageOpt("-min", tr("Start minimized").toStdString()); - strUsage += HelpMessageOpt("-splash", strprintf(tr("Show splash screen on startup (default: %u)").toStdString(), DEFAULT_SPLASHSCREEN)); - strUsage += HelpMessageOpt("-hidecharts", strprintf(tr("Hide QT staking charts on startup (default: %u)").toStdString(), false)); + strUsage += HelpMessageGroup("UI Options:"); + strUsage += HelpMessageOpt("-choosedatadir", strprintf("Choose data directory on startup (default: %u)", DEFAULT_CHOOSE_DATADIR)); + strUsage += HelpMessageOpt("-lang=", "Set language, for example \"de_DE\" (default: system locale)"); + strUsage += HelpMessageOpt("-min", "Start minimized"); + strUsage += HelpMessageOpt("-splash", strprintf("Show splash screen on startup (default: %u)", DEFAULT_SPLASHSCREEN)); + strUsage += HelpMessageOpt("-hidecharts", strprintf("Hide QT staking charts on startup (default: %u)", false)); QString coreOptions = QString::fromStdString(strUsage); - text = version + "\n" + header + "\n" + coreOptions; + text = version + "\n\n" + header + "\n" + coreOptions; QTextTableFormat tf; tf.setBorderStyle(QTextFrameFormat::BorderStyle_None); @@ -151,7 +154,7 @@ ShutdownWindow::ShutdownWindow(QWidget* parent, Qt::WindowFlags f) : QWidget(par { QVBoxLayout* layout = new QVBoxLayout(); layout->addWidget(new QLabel( - tr("PIVX Core is shutting down...") + "

" + + tr("%1 is shutting down...").arg(PACKAGE_NAME) + "

" + tr("Do not shut down the computer until this window disappears."))); setLayout(layout); } diff --git a/src/spork.cpp b/src/spork.cpp index 55190602ed7d..4e7c58e368d4 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -167,11 +167,9 @@ int CSporkManager::ProcessSporkMsg(CSporkMessage& spork) LogPrintf("%s : got %s spork %d (%s) with value %d (signed at %d)\n", __func__, strStatus, spork.nSporkID, sporkName, spork.nValue, spork.nTimeSigned); - AddOrUpdateSporkMessage(spork); + AddOrUpdateSporkMessage(spork, true); spork.Relay(); - // PIVX: add to spork database. - pSporkDB->WriteSpork(spork.nSporkID, spork); // All good. return 0; } @@ -201,18 +199,24 @@ bool CSporkManager::UpdateSpork(SporkId nSporkID, int64_t nValue) if (spork.Sign(strMasterPrivKey)) { spork.Relay(); - AddOrUpdateSporkMessage(spork); + AddOrUpdateSporkMessage(spork, true); return true; } return false; } -void CSporkManager::AddOrUpdateSporkMessage(const CSporkMessage& spork) +void CSporkManager::AddOrUpdateSporkMessage(const CSporkMessage& spork, bool flush) { - LOCK(cs); - mapSporks[spork.GetHash()] = spork; - mapSporksActive[spork.nSporkID] = spork; + { + LOCK(cs); + mapSporks[spork.GetHash()] = spork; + mapSporksActive[spork.nSporkID] = spork; + } + if (flush) { + // add to spork database. + pSporkDB->WriteSpork(spork.nSporkID, spork); + } } // grab the spork value, and see if it's off diff --git a/src/spork.h b/src/spork.h index a7235cc2ec62..1b9964fb7b66 100644 --- a/src/spork.h +++ b/src/spork.h @@ -88,8 +88,9 @@ class CSporkManager int64_t GetSporkValue(SporkId nSporkID); // Create/Sign/Relay the spork message, and update the maps bool UpdateSpork(SporkId nSporkID, int64_t nValue); - // Add spork message to mapSporks and mapSporksActive - void AddOrUpdateSporkMessage(const CSporkMessage& spork); + // Add spork message to mapSporks and mapSporksActive. + // if flush=true, save to DB as well + void AddOrUpdateSporkMessage(const CSporkMessage& spork, bool flush = false); bool IsSporkActive(SporkId nSporkID); std::string GetSporkNameByID(SporkId id); diff --git a/src/timedata.cpp b/src/timedata.cpp index e29cfcad0c96..6fbc3d1a6257 100644 --- a/src/timedata.cpp +++ b/src/timedata.cpp @@ -3,6 +3,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "timedata.h" #include "chainparams.h" @@ -77,7 +81,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample, int nOffsetLimit) SetMiscWarning(""); } else { nTimeOffset = (nMedian > 0 ? 1 : -1) * nOffsetLimit; - std::string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong PIVX Core will not work properly."); + std::string strMessage = strprintf(_("Warning: Please check that your computer's date and time are correct! If your clock is wrong %s will not work properly."), PACKAGE_NAME); SetMiscWarning(strMessage); LogPrintf("*** %s\n", strMessage); uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_ERROR); diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index 5d88ba4124ae..61a42926d00f 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -16,35 +16,35 @@ std::string GetWalletHelpString(bool showDebug) { - std::string strUsage = HelpMessageGroup(_("Wallet options:")); - strUsage += HelpMessageOpt("-createwalletbackups=", strprintf(_("Number of automatic wallet backups (default: %d)"), DEFAULT_CREATEWALLETBACKUPS)); - strUsage += HelpMessageOpt("-disablewallet", strprintf(_("Do not load the wallet and disable wallet RPC calls (default: %u)"), DEFAULT_DISABLE_WALLET)); - strUsage += HelpMessageOpt("-keypool=", strprintf(_("Set key pool size to (default: %u)"), DEFAULT_KEYPOOL_SIZE)); - strUsage += HelpMessageOpt("-legacywallet", _("On first run, create a legacy wallet instead of a HD wallet")); - strUsage += HelpMessageOpt("-maxtxfee=", strprintf(_("Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)"), FormatMoney(maxTxFee))); - strUsage += HelpMessageOpt("-mintxfee=", strprintf(_("Fees (in %s/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), CURRENCY_UNIT, FormatMoney(CWallet::minTxFee.GetFeePerK()))); - strUsage += HelpMessageOpt("-paytxfee=", strprintf(_("Fee (in %s/kB) to add to transactions you send (default: %s)"), CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK()))); - strUsage += HelpMessageOpt("-rescan", _("Rescan the block chain for missing wallet transactions") + " " + _("on startup")); - strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet file") + " " + _("on startup")); - strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), DEFAULT_SPEND_ZEROCONF_CHANGE)); - strUsage += HelpMessageOpt("-txconfirmtarget=", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), 1)); - strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup")); - strUsage += HelpMessageOpt("-wallet=", _("Specify wallet database path. Can be specified multiple times to load multiple wallets. Path is interpreted relative to if it is not absolute, and will be created if it does not exist (as a directory containing a wallet.dat file and log files). For backwards compatibility this will also accept names of existing data files in .)")); - strUsage += HelpMessageOpt("-walletdir=", _("Specify directory to hold wallets (default: /wallets if it exists, otherwise )")); - strUsage += HelpMessageOpt("-walletnotify=", _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)")); - strUsage += HelpMessageOpt("-zapwallettxes=", _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + - " " + _("(1 = keep tx meta data e.g. payment request information, 2 = drop tx meta data)")); - strUsage += HelpMessageGroup(_("Mining/Staking options:")); - strUsage += HelpMessageOpt("-coldstaking=", strprintf(_("Enable cold staking functionality (0-1, default: %u). Disabled if staking=0"), DEFAULT_COLDSTAKING)); - strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), DEFAULT_GENERATE)); - strUsage += HelpMessageOpt("-genproclimit=", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), DEFAULT_GENERATE_PROCLIMIT)); - strUsage += HelpMessageOpt("-minstakesplit=", strprintf(_("Minimum positive amount (in PIV) allowed by GUI and RPC for the stake split threshold (default: %s)"), FormatMoney(DEFAULT_MIN_STAKE_SPLIT_THRESHOLD))); - strUsage += HelpMessageOpt("-staking=", strprintf(_("Enable staking functionality (0-1, default: %u)"), DEFAULT_STAKING)); + std::string strUsage = HelpMessageGroup("Wallet options:"); + strUsage += HelpMessageOpt("-createwalletbackups=", strprintf("Number of automatic wallet backups (default: %d)", DEFAULT_CREATEWALLETBACKUPS)); + strUsage += HelpMessageOpt("-disablewallet", strprintf("Do not load the wallet and disable wallet RPC calls (default: %u)", DEFAULT_DISABLE_WALLET)); + strUsage += HelpMessageOpt("-keypool=", strprintf("Set key pool size to (default: %u)", DEFAULT_KEYPOOL_SIZE)); + strUsage += HelpMessageOpt("-legacywallet", "On first run, create a legacy wallet instead of a HD wallet"); + strUsage += HelpMessageOpt("-maxtxfee=", strprintf("Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)", FormatMoney(maxTxFee))); + strUsage += HelpMessageOpt("-mintxfee=", strprintf("Fees (in %s/Kb) smaller than this are considered zero fee for transaction creation (default: %s)", CURRENCY_UNIT, FormatMoney(CWallet::minTxFee.GetFeePerK()))); + strUsage += HelpMessageOpt("-paytxfee=", strprintf("Fee (in %s/kB) to add to transactions you send (default: %s)", CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK()))); + strUsage += HelpMessageOpt("-rescan", "Rescan the block chain for missing wallet transactions on startup"); + strUsage += HelpMessageOpt("-salvagewallet", "Attempt to recover private keys from a corrupt wallet file on startup"); + strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf("Spend unconfirmed change when sending transactions (default: %u)", DEFAULT_SPEND_ZEROCONF_CHANGE)); + strUsage += HelpMessageOpt("-txconfirmtarget=", strprintf("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)", 1)); + strUsage += HelpMessageOpt("-upgradewallet", "Upgrade wallet to latest format on startup"); + strUsage += HelpMessageOpt("-wallet=", "Specify wallet database path. Can be specified multiple times to load multiple wallets. Path is interpreted relative to if it is not absolute, and will be created if it does not exist (as a directory containing a wallet.dat file and log files). For backwards compatibility this will also accept names of existing data files in .)"); + strUsage += HelpMessageOpt("-walletdir=", "Specify directory to hold wallets (default: /wallets if it exists, otherwise )"); + strUsage += HelpMessageOpt("-walletnotify=", "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)"); + strUsage += HelpMessageOpt("-zapwallettxes=", "Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup" + "(1 = keep tx meta data e.g. payment request information, 2 = drop tx meta data)"); + strUsage += HelpMessageGroup("Mining/Staking options:"); + strUsage += HelpMessageOpt("-coldstaking=", strprintf("Enable cold staking functionality (0-1, default: %u). Disabled if staking=0", DEFAULT_COLDSTAKING)); + strUsage += HelpMessageOpt("-gen", strprintf("Generate coins (default: %u)", DEFAULT_GENERATE)); + strUsage += HelpMessageOpt("-genproclimit=", strprintf("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)", DEFAULT_GENERATE_PROCLIMIT)); + strUsage += HelpMessageOpt("-minstakesplit=", strprintf("Minimum positive amount (in PIV) allowed by GUI and RPC for the stake split threshold (default: %s)", FormatMoney(DEFAULT_MIN_STAKE_SPLIT_THRESHOLD))); + strUsage += HelpMessageOpt("-staking=", strprintf("Enable staking functionality (0-1, default: %u)", DEFAULT_STAKING)); if (showDebug) { - strUsage += HelpMessageGroup(_("Wallet debugging/testing options:")); - strUsage += HelpMessageOpt("-dblogsize=", strprintf(_("Flush database activity from memory pool to disk log every megabytes (default: %u)"), DEFAULT_WALLET_DBLOGSIZE)); - strUsage += HelpMessageOpt("-flushwallet", strprintf(_("Run a thread to flush wallet periodically (default: %u)"), DEFAULT_FLUSHWALLET)); - strUsage += HelpMessageOpt("-privdb", strprintf(_("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"), DEFAULT_WALLET_PRIVDB)); + strUsage += HelpMessageGroup("Wallet debugging/testing options:"); + strUsage += HelpMessageOpt("-dblogsize=", strprintf("Flush database activity from memory pool to disk log every megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE)); + strUsage += HelpMessageOpt("-flushwallet", strprintf("Run a thread to flush wallet periodically (default: %u)", DEFAULT_FLUSHWALLET)); + strUsage += HelpMessageOpt("-privdb", strprintf("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)", DEFAULT_WALLET_PRIVDB)); } return strUsage; diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index ed2d05219bb1..4e8e55d54207 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -567,7 +567,7 @@ UniValue dumpwallet(const JSONRPCRequest& request) CBlockIndex* tip = chainActive.Tip(); // produce output - file << strprintf("# Wallet dump created by PIVX %s (%s)\n", CLIENT_BUILD, CLIENT_DATE); + file << strprintf("# Wallet dump created by PIVX %s\n", CLIENT_BUILD); file << strprintf("# * Created on %s\n", FormatISO8601DateTime(GetTime())); if (tip) { file << strprintf("# * Best block at time of backup was %i (%s),\n", tip->nHeight, diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index e3b0a0946790..b349f133606d 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4519,7 +4519,7 @@ UniValue setautocombinethreshold(const JSONRPCRequest& request) "}\n" "\nExamples:\n" + - HelpExampleCli("setautocombinethreshold", "500.12") + HelpExampleRpc("setautocombinethreshold", "500.12")); + HelpExampleCli("setautocombinethreshold", "true 500.12") + HelpExampleRpc("setautocombinethreshold", "true, 500.12")); RPCTypeCheck(request.params, {UniValue::VBOOL, UniValue::VNUM}); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 562b1170be61..3ab6598d89cb 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -5,6 +5,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/pivx-config.h" +#endif + #include "wallet/wallet.h" #include "budget/budgetmanager.h" @@ -4129,10 +4133,10 @@ CWallet* CWallet::CreateWalletFromFile(const std::string& name, const fs::path& UIWarning(strprintf(_("Warning: error reading %s! All keys read correctly, but transaction data" " or address book entries might be missing or incorrect."), walletFile)); } else if (nLoadWalletRet == DB_TOO_NEW) { - UIError(strprintf(_("Error loading %s: Wallet requires newer version of PIVX Core"), walletFile)); + UIError(strprintf(_("Error loading %s: Wallet requires newer version of %s"), walletFile, PACKAGE_NAME)); return nullptr; } else if (nLoadWalletRet == DB_NEED_REWRITE) { - UIError(_("Wallet needed to be rewritten: restart PIVX Core to complete")); + UIError(strprintf(_("Wallet needed to be rewritten: restart %s to complete"), PACKAGE_NAME)); return nullptr; } else { UIError(strprintf(_("Error loading %s\n"), walletFile));