Auto merge of #2007 - bitcartel:1097_copyright_notice_and_date, r=bitcartel
Closes #1097 so that zcash-cli 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.
This commit is contained in:
commit
78674ca79e
|
@ -301,7 +301,7 @@ class WalletTest (BitcoinTestFramework):
|
||||||
opids = []
|
opids = []
|
||||||
opids.append(myopid)
|
opids.append(myopid)
|
||||||
|
|
||||||
timeout = 120
|
timeout = 300
|
||||||
status = None
|
status = None
|
||||||
for x in xrange(1, timeout):
|
for x in xrange(1, timeout):
|
||||||
results = self.nodes[2].z_getoperationresult(opids)
|
results = self.nodes[2].z_getoperationresult(opids)
|
||||||
|
|
|
@ -71,6 +71,8 @@ static bool AppInitRPC(int argc, char* argv[])
|
||||||
" zcash-cli [options] help <command> " + _("Get help for a command") + "\n";
|
" zcash-cli [options] help <command> " + _("Get help for a command") + "\n";
|
||||||
|
|
||||||
strUsage += "\n" + HelpMessageCli();
|
strUsage += "\n" + HelpMessageCli();
|
||||||
|
} else {
|
||||||
|
strUsage += LicenseInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stdout, "%s", strUsage.c_str());
|
fprintf(stdout, "%s", strUsage.c_str());
|
||||||
|
|
13
src/init.cpp
13
src/init.cpp
|
@ -462,19 +462,6 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||||
return strUsage;
|
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 <http://www.opensource.org/licenses/mit-license.php>.")) + "\n" +
|
|
||||||
"\n" +
|
|
||||||
FormatParagraph(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")) +
|
|
||||||
"\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
static void BlockNotifyCallback(const uint256& hashNewTip)
|
static void BlockNotifyCallback(const uint256& hashNewTip)
|
||||||
{
|
{
|
||||||
std::string strCmd = GetArg("-blocknotify", "");
|
std::string strCmd = GetArg("-blocknotify", "");
|
||||||
|
|
|
@ -34,7 +34,5 @@ enum HelpMessageMode {
|
||||||
|
|
||||||
/** Help for options shared between UI and daemon (for -help) */
|
/** Help for options shared between UI and daemon (for -help) */
|
||||||
std::string HelpMessage(HelpMessageMode mode);
|
std::string HelpMessage(HelpMessageMode mode);
|
||||||
/** Returns licensing information (for -version) */
|
|
||||||
std::string LicenseInfo();
|
|
||||||
|
|
||||||
#endif // BITCOIN_INIT_H
|
#endif // BITCOIN_INIT_H
|
||||||
|
|
13
src/util.cpp
13
src/util.cpp
|
@ -835,3 +835,16 @@ void SetThreadPriority(int nPriority)
|
||||||
#endif // PRIO_THREAD
|
#endif // PRIO_THREAD
|
||||||
#endif // WIN32
|
#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 <http://www.opensource.org/licenses/mit-license.php>.")) + "\n" +
|
||||||
|
"\n" +
|
||||||
|
FormatParagraph(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")) +
|
||||||
|
"\n";
|
||||||
|
}
|
||||||
|
|
|
@ -140,6 +140,9 @@ void ShrinkDebugFile();
|
||||||
void runCommand(std::string strCommand);
|
void runCommand(std::string strCommand);
|
||||||
const boost::filesystem::path GetExportDir();
|
const boost::filesystem::path GetExportDir();
|
||||||
|
|
||||||
|
/** Returns licensing information (for -version) */
|
||||||
|
std::string LicenseInfo();
|
||||||
|
|
||||||
inline bool IsSwitchChar(char c)
|
inline bool IsSwitchChar(char c)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
Loading…
Reference in New Issue