diff --git a/src/seeder/main.cpp b/src/seeder/main.cpp --- a/src/seeder/main.cpp +++ b/src/seeder/main.cpp @@ -67,11 +67,15 @@ error.c_str()); return EXIT_FAILURE; } - if (HelpRequested(gArgs)) { - std::string strUsage = "Bitcoin-cash-seeder\nUsage: bitcoin-seeder " - "-host= -ns= [-mbox=] " - "[-threads=] [-port=]\n\n" + - gArgs.GetHelpMessage(); + if (HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { + std::string strUsage = + PACKAGE_NAME " Seeder " + FormatFullVersion() + "\n"; + if (HelpRequested(gArgs)) { + strUsage += + "\nUsage: bitcoin-seeder -host= -ns= " + "[-mbox=] [-threads=] [-port=]\n\n" + + gArgs.GetHelpMessage(); + } fprintf(stdout, "%s", strUsage.c_str()); return EXIT_SUCCESS; @@ -118,6 +122,8 @@ void SetupSeederArgs() { gArgs.AddArg("-?", _("Print this help message and exit"), false, OptionsCategory::OPTIONS); + gArgs.AddArg("-version", _("Print version and exit"), false, + OptionsCategory::OPTIONS); gArgs.AddArg("-host=", _("Hostname of the DNS seed"), false, OptionsCategory::OPTIONS); gArgs.AddArg("-ns=", _("Hostname of the nameserver"), false,