From af02114469d1b5734c3f8a3096562217459ac4da Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 9 Jan 2017 23:17:48 -0800 Subject: [PATCH 1/2] Closes #1097 so zcash-cli now displays license info like zcashd. LicenseInfo is refactored from init.cpp to util.cpp so that the bitcoin-cli makefile target does not need to be modified. --- src/bitcoin-cli.cpp | 2 ++ src/init.cpp | 13 ------------- src/init.h | 2 -- src/util.cpp | 13 +++++++++++++ src/util.h | 3 +++ 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 4954a44a2..16cda9dc0 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -71,6 +71,8 @@ static bool AppInitRPC(int argc, char* argv[]) " zcash-cli [options] help " + _("Get help for a command") + "\n"; strUsage += "\n" + HelpMessageCli(); + } else { + strUsage += LicenseInfo(); } fprintf(stdout, "%s", strUsage.c_str()); diff --git a/src/init.cpp b/src/init.cpp index 53f6fb832..9a7fd8829 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -460,19 +460,6 @@ std::string HelpMessage(HelpMessageMode mode) return strUsage; } -std::string LicenseInfo() -{ - return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" + - FormatParagraph(strprintf(_("Copyright (C) 2015-%i The Zcash Developers"), COPYRIGHT_YEAR)) + "\n" + - "\n" + - FormatParagraph(_("This is experimental software.")) + "\n" + - "\n" + - FormatParagraph(_("Distributed under the MIT software license, see the accompanying file COPYING or .")) + "\n" + - "\n" + - FormatParagraph(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")) + - "\n"; -} - static void BlockNotifyCallback(const uint256& hashNewTip) { std::string strCmd = GetArg("-blocknotify", ""); diff --git a/src/init.h b/src/init.h index cfc88255b..34290b276 100644 --- a/src/init.h +++ b/src/init.h @@ -34,7 +34,5 @@ enum HelpMessageMode { /** Help for options shared between UI and daemon (for -help) */ std::string HelpMessage(HelpMessageMode mode); -/** Returns licensing information (for -version) */ -std::string LicenseInfo(); #endif // BITCOIN_INIT_H diff --git a/src/util.cpp b/src/util.cpp index b667acc5e..b38f67ada 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -815,3 +815,16 @@ void SetThreadPriority(int nPriority) #endif // PRIO_THREAD #endif // WIN32 } + +std::string LicenseInfo() +{ + return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" + + FormatParagraph(strprintf(_("Copyright (C) 2015-%i The Zcash Developers"), COPYRIGHT_YEAR)) + "\n" + + "\n" + + FormatParagraph(_("This is experimental software.")) + "\n" + + "\n" + + FormatParagraph(_("Distributed under the MIT software license, see the accompanying file COPYING or .")) + "\n" + + "\n" + + FormatParagraph(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")) + + "\n"; +} diff --git a/src/util.h b/src/util.h index ef3a347fa..bbfafaf60 100644 --- a/src/util.h +++ b/src/util.h @@ -135,6 +135,9 @@ boost::filesystem::path GetTempPath(); void ShrinkDebugFile(); void runCommand(std::string strCommand); +/** Returns licensing information (for -version) */ +std::string LicenseInfo(); + inline bool IsSwitchChar(char c) { #ifdef WIN32 From 774489569ad3a092d2eba0ea1eaac5e90e9c9bbc Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 18 Jan 2017 16:54:39 -0800 Subject: [PATCH 2/2] Increase timeout for z_sendmany transaction in wallet.py qa test --- qa/rpc-tests/wallet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index cde7c1aad..e32561881 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -301,7 +301,7 @@ class WalletTest (BitcoinTestFramework): opids = [] opids.append(myopid) - timeout = 120 + timeout = 300 status = None for x in xrange(1, timeout): results = self.nodes[2].z_getoperationresult(opids)