|
52 | 52 | #include <stdint.h> |
53 | 53 | #include <stdio.h> |
54 | 54 |
|
| 55 | +#include <omnicore/version.h> |
| 56 | + |
55 | 57 | #ifndef WIN32 |
56 | 58 | #include <attributes.h> |
57 | 59 | #include <cerrno> |
@@ -552,21 +554,22 @@ void SetupServerArgs() |
552 | 554 |
|
553 | 555 | // TODO: append help messages somewhere else |
554 | 556 | // TODO: translation |
555 | | - gArgs.AddArg("-startclean", "Clear all persistence files on startup; triggers reparsing of Omni transactions (default: 0)", false, OptionsCategory::BLOCK_CREATION); |
556 | | - gArgs.AddArg("-omnitxcache", "The maximum number of transactions in the input transaction cache (default: 500000)", false, OptionsCategory::BLOCK_CREATION); |
557 | | - gArgs.AddArg("-omniprogressfrequency", "Time in seconds after which the initial scanning progress is reported (default: 30)", false, OptionsCategory::BLOCK_CREATION); |
558 | | - gArgs.AddArg("-omniseedblockfilter", "Set skipping of blocks without Omni transactions during initial scan (default: 1)", false, OptionsCategory::BLOCK_CREATION); |
559 | | - gArgs.AddArg("-omnilogfile", "The path of the log file (default: omnicore.log)", false, OptionsCategory::BLOCK_CREATION); |
560 | | - gArgs.AddArg("-omnidebug=<category>", "Enable or disable log categories, can be \"all\" or \"none\"", false, OptionsCategory::BLOCK_CREATION); |
561 | | - gArgs.AddArg("-autocommit", "Enable or disable broadcasting of transactions, when creating transactions (default: 1)", false, OptionsCategory::BLOCK_CREATION); |
562 | | - gArgs.AddArg("-overrideforcedshutdown", "Overwrite shutdown, triggered by an alert (default: 0)", false, OptionsCategory::BLOCK_CREATION); |
563 | | - gArgs.AddArg("-omnialertallowsender", "Whitelist senders of alerts, can be \"any\")", false, OptionsCategory::BLOCK_CREATION); |
564 | | - gArgs.AddArg("-omnialertignoresender", "Ignore senders of alerts", false, OptionsCategory::BLOCK_CREATION); |
565 | | - gArgs.AddArg("-omniactivationignoresender", "Ignore senders of activations", false, OptionsCategory::BLOCK_CREATION); |
566 | | - gArgs.AddArg("-omniactivationallowsender", "Whitelist senders of activations", false, OptionsCategory::BLOCK_CREATION); |
567 | | - gArgs.AddArg("-disclaimer", "Explicitly show QT disclaimer on startup (default: 0)", false, OptionsCategory::BLOCK_CREATION); |
568 | | - gArgs.AddArg("-omniuiwalletscope", "Max. transactions to show in trade and transaction history (default: 65535)", false, OptionsCategory::BLOCK_CREATION); |
569 | | - gArgs.AddArg("-omnishowblockconsensushash", "Calculate and log the consensus hash for the specified block", false, OptionsCategory::BLOCK_CREATION); |
| 557 | + gArgs.AddArg("-startclean", "Clear all persistence files on startup; triggers reparsing of Omni transactions (default: 0)", false, OptionsCategory::OMNI); |
| 558 | + gArgs.AddArg("-omnitxcache", "The maximum number of transactions in the input transaction cache (default: 500000)", false, OptionsCategory::OMNI); |
| 559 | + gArgs.AddArg("-omniprogressfrequency", "Time in seconds after which the initial scanning progress is reported (default: 30)", false, OptionsCategory::OMNI); |
| 560 | + gArgs.AddArg("-omniseedblockfilter", "Set skipping of blocks without Omni transactions during initial scan (default: 1)", false, OptionsCategory::OMNI); |
| 561 | + gArgs.AddArg("-omnilogfile", "The path of the log file (default: omnicore.log)", false, OptionsCategory::OMNI); |
| 562 | + gArgs.AddArg("-omnidebug=<category>", "Enable or disable log categories, can be \"all\" or \"none\"", false, OptionsCategory::OMNI); |
| 563 | + gArgs.AddArg("-autocommit", "Enable or disable broadcasting of transactions, when creating transactions (default: 1)", false, OptionsCategory::OMNI); |
| 564 | + gArgs.AddArg("-overrideforcedshutdown", "Overwrite shutdown, triggered by an alert (default: 0)", false, OptionsCategory::OMNI); |
| 565 | + gArgs.AddArg("-omnialertallowsender", "Whitelist senders of alerts, can be \"any\")", false, OptionsCategory::OMNI); |
| 566 | + gArgs.AddArg("-omnialertignoresender", "Ignore senders of alerts", false, OptionsCategory::OMNI); |
| 567 | + gArgs.AddArg("-omniactivationignoresender", "Ignore senders of activations", false, OptionsCategory::OMNI); |
| 568 | + gArgs.AddArg("-omniactivationallowsender", "Whitelist senders of activations", false, OptionsCategory::OMNI); |
| 569 | + gArgs.AddArg("-disclaimer", "Explicitly show QT disclaimer on startup (default: 0)", false, OptionsCategory::OMNI); |
| 570 | + gArgs.AddArg("-omniuiwalletscope", "Max. transactions to show in trade and transaction history (default: 65535)", false, OptionsCategory::OMNI); |
| 571 | + gArgs.AddArg("-omnishowblockconsensushash", "Calculate and log the consensus hash for the specified block", false, OptionsCategory::OMNI); |
| 572 | + gArgs.AddArg("-omniuseragent", "Show Omni and Omni version in user agent string (default: 1)", false, OptionsCategory::OMNI); |
570 | 573 |
|
571 | 574 |
|
572 | 575 | #if HAVE_DECL_DAEMON |
@@ -1371,7 +1374,13 @@ bool AppInitMain(InitInterfaces& interfaces) |
1371 | 1374 | return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt)); |
1372 | 1375 | uacomments.push_back(cmt); |
1373 | 1376 | } |
1374 | | - strSubVersion = FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, uacomments); |
| 1377 | + |
| 1378 | + if (gArgs.GetArg("-omniuseragent", true)) { |
| 1379 | + strSubVersion = FormatSubVersion(OMNI_CLIENT_NAME, OMNI_USERAGENT_VERSION, uacomments); |
| 1380 | + } else { |
| 1381 | + strSubVersion = FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, uacomments); |
| 1382 | + } |
| 1383 | + |
1375 | 1384 | if (strSubVersion.size() > MAX_SUBVERSION_LENGTH) { |
1376 | 1385 | return InitError(strprintf(_("Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments."), |
1377 | 1386 | strSubVersion.size(), MAX_SUBVERSION_LENGTH)); |
|
0 commit comments