diff --git a/configure.ac b/configure.ac index 8a3104200d..d25666d42b 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2023) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]]) -AC_INIT([Bitcoin Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/]) +AC_INIT([Bitcoin Knots],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoinknots/bitcoin/issues],[bitcoin],[https://bitcoinknots.org/]) AC_CONFIG_SRCDIR([src/validation.cpp]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/src/clientversion.cpp b/src/clientversion.cpp index e7d63e34c6..0b00bb0f98 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -60,7 +60,7 @@ std::string FormatFullVersion() /** * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) */ -std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments) +std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments, const bool fBaseNameOnly) { std::ostringstream ss; ss << "/"; @@ -74,6 +74,8 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const ss << ")"; } ss << "/"; + if (!fBaseNameOnly) + ss << "Knots:20170901/"; return ss.str(); } @@ -91,7 +93,7 @@ std::string CopyrightHolders(const std::string& strPrefix) std::string LicenseInfo() { - const std::string URL_SOURCE_CODE = ""; + const std::string URL_SOURCE_CODE = ""; return CopyrightHolders(strprintf(_("Copyright (C) %i-%i").translated, 2009, COPYRIGHT_YEAR) + " ") + "\n" + "\n" + diff --git a/src/clientversion.h b/src/clientversion.h index 9da0cd0b39..849243c2ea 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -39,7 +39,7 @@ extern const std::string CLIENT_NAME; std::string FormatFullVersion(); -std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments); +std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments, bool fBaseNameOnly = false); std::string CopyrightHolders(const std::string& strPrefix); diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 7d6c96ab40..df50594c23 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -1027,9 +1027,9 @@ BOOST_AUTO_TEST_CASE(test_FormatSubVersion) std::vector comments2; comments2.emplace_back("comment1"); comments2.push_back(SanitizeString(std::string("Comment2; .,_?@-; !\"#$%&'()*+/<=>[]\\^`{|}~"), SAFE_CHARS_UA_COMMENT)); // Semicolon is discouraged but not forbidden by BIP-0014 - BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, std::vector()),std::string("/Test:9.99.0/")); - BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments),std::string("/Test:9.99.0(comment1)/")); - BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments2),std::string("/Test:9.99.0(comment1; Comment2; .,_?@-; )/")); + BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, std::vector(), true),std::string("/Test:9.99.0/")); + BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments, true),std::string("/Test:9.99.0(comment1)/")); + BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments2, true),std::string("/Test:9.99.0(comment1; Comment2; .,_?@-; )/")); } BOOST_AUTO_TEST_CASE(test_ParseFixedPoint)