Skip to content

Commit a56c115

Browse files
committed
Bitcoin Knots branding
1 parent 0db147c commit a56c115

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ define(_CLIENT_VERSION_IS_RELEASE, false)
77
define(_COPYRIGHT_YEAR, 2024)
88
define(_COPYRIGHT_HOLDERS,[The %s developers])
99
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
10-
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/])
10+
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/])
1111
AC_CONFIG_SRCDIR([src/validation.cpp])
1212
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
1313
AC_CONFIG_AUX_DIR([build-aux])

src/clientversion.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ std::string FormatFullVersion()
6464
/**
6565
* Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki)
6666
*/
67-
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
67+
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments, const bool base_name_only)
6868
{
6969
std::string comments_str;
7070
if (!comments.empty()) comments_str = strprintf("(%s)", Join(comments, "; "));
71-
return strprintf("/%s:%s%s/", name, FormatVersion(nClientVersion), comments_str);
71+
std::string ua = strprintf("/%s:%s%s/", name, FormatVersion(nClientVersion), comments_str);
72+
if (!base_name_only) {
73+
ua += "Knots:20250205/";
74+
}
75+
return ua;
7276
}
7377

7478
std::string CopyrightHolders(const std::string& strPrefix)
@@ -85,7 +89,7 @@ std::string CopyrightHolders(const std::string& strPrefix)
8589

8690
std::string LicenseInfo()
8791
{
88-
const std::string URL_SOURCE_CODE = "<https://github.com/bitcoin/bitcoin>";
92+
const std::string URL_SOURCE_CODE = "<https://github.com/bitcoinknots/bitcoin>";
8993

9094
return CopyrightHolders(strprintf(_("Copyright (C) %i-%i").translated, 2009, COPYRIGHT_YEAR) + " ") + "\n" +
9195
"\n" +

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern const std::string CLIENT_NAME;
3737

3838

3939
std::string FormatFullVersion();
40-
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
40+
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments, bool base_name_only = false);
4141

4242
std::string CopyrightHolders(const std::string& strPrefix);
4343

src/test/util_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,9 +1040,9 @@ BOOST_AUTO_TEST_CASE(test_FormatSubVersion)
10401040
std::vector<std::string> comments2;
10411041
comments2.emplace_back("comment1");
10421042
comments2.push_back(SanitizeString(std::string("Comment2; .,_?@-; !\"#$%&'()*+/<=>[]\\^`{|}~"), SAFE_CHARS_UA_COMMENT)); // Semicolon is discouraged but not forbidden by BIP-0014
1043-
BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, std::vector<std::string>()),std::string("/Test:9.99.0/"));
1044-
BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments),std::string("/Test:9.99.0(comment1)/"));
1045-
BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments2),std::string("/Test:9.99.0(comment1; Comment2; .,_?@-; )/"));
1043+
BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, std::vector<std::string>(), true),std::string("/Test:9.99.0/"));
1044+
BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments, true),std::string("/Test:9.99.0(comment1)/"));
1045+
BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments2, true),std::string("/Test:9.99.0(comment1; Comment2; .,_?@-; )/"));
10461046
}
10471047

10481048
BOOST_AUTO_TEST_CASE(test_ParseFixedPoint)

0 commit comments

Comments
 (0)