mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
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-
This commit is contained in:
parent
1c7ca6e64d
commit
e6e29e3c94
3 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ using util::Join;
|
||||||
* for both bitcoind and bitcoin-qt, to make it harder for attackers to
|
* for both bitcoind and bitcoin-qt, to make it harder for attackers to
|
||||||
* target servers or GUI users specifically.
|
* target servers or GUI users specifically.
|
||||||
*/
|
*/
|
||||||
const std::string CLIENT_NAME("Satoshi");
|
const std::string UA_NAME("Satoshi");
|
||||||
|
|
||||||
|
|
||||||
#include <bitcoin-build-info.h>
|
#include <bitcoin-build-info.h>
|
||||||
|
|
|
@ -33,7 +33,7 @@ static const int CLIENT_VERSION =
|
||||||
+ 100 * CLIENT_VERSION_MINOR
|
+ 100 * CLIENT_VERSION_MINOR
|
||||||
+ 1 * CLIENT_VERSION_BUILD;
|
+ 1 * CLIENT_VERSION_BUILD;
|
||||||
|
|
||||||
extern const std::string CLIENT_NAME;
|
extern const std::string UA_NAME;
|
||||||
|
|
||||||
|
|
||||||
std::string FormatFullVersion();
|
std::string FormatFullVersion();
|
||||||
|
|
|
@ -1464,7 +1464,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||||
return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt));
|
return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt));
|
||||||
uacomments.push_back(cmt);
|
uacomments.push_back(cmt);
|
||||||
}
|
}
|
||||||
strSubVersion = FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, uacomments);
|
strSubVersion = FormatSubVersion(UA_NAME, CLIENT_VERSION, uacomments);
|
||||||
if (strSubVersion.size() > MAX_SUBVERSION_LENGTH) {
|
if (strSubVersion.size() > MAX_SUBVERSION_LENGTH) {
|
||||||
return InitError(strprintf(_("Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments."),
|
return InitError(strprintf(_("Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments."),
|
||||||
strSubVersion.size(), MAX_SUBVERSION_LENGTH));
|
strSubVersion.size(), MAX_SUBVERSION_LENGTH));
|
||||||
|
|
Loading…
Reference in a new issue