Skip to content

Commit e6e29e3

Browse files
committed
scripted-diff: Clarify "user agent" variable name
This change allows to the use of the `CLIENT_` namespace without potential name clashes. -BEGIN VERIFY SCRIPT- sed -i "s/\<CLIENT_NAME\>/UA_NAME/g" $( git grep -l "CLIENT_NAME" ./src) -END VERIFY SCRIPT-
1 parent 1c7ca6e commit e6e29e3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/clientversion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using util::Join;
2020
* for both bitcoind and bitcoin-qt, to make it harder for attackers to
2121
* target servers or GUI users specifically.
2222
*/
23-
const std::string CLIENT_NAME("Satoshi");
23+
const std::string UA_NAME("Satoshi");
2424

2525

2626
#include <bitcoin-build-info.h>

src/clientversion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static const int CLIENT_VERSION =
3333
+ 100 * CLIENT_VERSION_MINOR
3434
+ 1 * CLIENT_VERSION_BUILD;
3535

36-
extern const std::string CLIENT_NAME;
36+
extern const std::string UA_NAME;
3737

3838

3939
std::string FormatFullVersion();

src/init.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
14641464
return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt));
14651465
uacomments.push_back(cmt);
14661466
}
1467-
strSubVersion = FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, uacomments);
1467+
strSubVersion = FormatSubVersion(UA_NAME, CLIENT_VERSION, uacomments);
14681468
if (strSubVersion.size() > MAX_SUBVERSION_LENGTH) {
14691469
return InitError(strprintf(_("Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments."),
14701470
strSubVersion.size(), MAX_SUBVERSION_LENGTH));

0 commit comments

Comments
 (0)