7#include <chainparams.h>
20 tfm::format(std::cerr,
"Error parsing command line arguments: %s\n",
29 "\nUsage: bitcoin-seeder -host=<host> -ns=<ns> "
30 "[-mbox=<mbox>] [-threads=<threads>] [-port=<port>]\n\n" +
43 "Error: -dumpinterval argument expects only positive integers\n");
51 "Error: -threads argument expects only positive integers\n");
57 tfm::format(std::cerr,
"Error: -port argument expects only positive "
58 "integers in the range 0 - 65535\n");
67 "Error: -dnsthreads argument expects only positive integers\n");
84 if (
ip_addr.find(
':') == std::string::npos) {
116 "-help-debug",
"Show all debugging options (usage: --help -help-debug)",
128 "E-Mail address reported in SOA records",
131 "-dumpinterval=<seconds>",
132 strprintf(
"Number of seconds between each database dump (default: %d)",
136 "-threads=<threads>",
137 strprintf(
"Number of crawlers to run in parallel (default: %d)",
141 strprintf(
"Number of DNS server threads (default: %d)",
145 strprintf(
"Address to listen on (default: '%s')",
155 "If set, only use the specified DNS seed when "
156 "querying for peer addresses via DNS lookup->",
163 "Allow these flag combinations as filters",
bool HelpRequested(const ArgsManager &args)
void SetupHelpOptions(ArgsManager &args)
Add help options to the args manager.
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given BIP70 chain name.
void SetupChainParamsBaseOptions(ArgsManager &argsman)
Set the arguments for chainparams.
bool ParseParameters(int argc, const char *const argv[], std::string &error)
std::string GetHelpMessage() const
Get the help string.
bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
Return integer argument or default value.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
void AddArg(const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat)
Add argument.
std::string GetChainName() const
Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
std::chrono::seconds dumpInterval
int ParseCommandLine(int argc, const char **argv)
std::set< uint64_t > filter_whitelist
ArgsManager * argsManager
std::string FormatFullVersion()
bool error(const char *fmt, const Args &...args)
static const bool DEFAULT_WIPE_BAN
static const int CONTINUE_EXECUTION
static const std::string DEFAULT_IPV4_PROXY
static const int DEFAULT_NUM_DNS_THREADS
static const std::string DEFAULT_IPV6_PROXY
static const int DEFAULT_DUMP_INTERVAL_SECONDS
static const std::string DEFAULT_HOST
static const std::string DEFAULT_LISTEN_ADDRESS
static const bool DEFAULT_WIPE_IGNORE
static const int DEFAULT_NUM_THREADS
static const std::string DEFAULT_EMAIL
static const std::string DEFAULT_TOR_PROXY
static const int DEFAULT_PORT
static const std::string DEFAULT_NAMESERVER
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
int64_t atoi64(const std::string &str)