Bitcoin ABC  0.24.10
P2P Digital Currency
options.h
Go to the documentation of this file.
1 // Copyright (c) 2022 The Bitcoin developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_SEEDER_OPTIONS_H
6 #define BITCOIN_SEEDER_OPTIONS_H
7 
8 #include <set>
9 #include <string>
10 
11 class ArgsManager;
12 
13 namespace seeder {
14 
15 static const int CONTINUE_EXECUTION = -1;
16 
17 static const int DEFAULT_NUM_THREADS = 96;
18 static const int DEFAULT_PORT = 53;
19 static const int DEFAULT_NUM_DNS_THREADS = 4;
20 static const bool DEFAULT_WIPE_BAN = false;
21 static const bool DEFAULT_WIPE_IGNORE = false;
22 static const std::string DEFAULT_EMAIL = "";
23 static const std::string DEFAULT_NAMESERVER = "";
24 static const std::string DEFAULT_HOST = "";
25 static const std::string DEFAULT_TOR_PROXY = "";
26 static const std::string DEFAULT_LISTEN_ADDRESS = "::";
27 static const std::string DEFAULT_IPV4_PROXY = "";
28 static const std::string DEFAULT_IPV6_PROXY = "";
29 
30 class CDnsSeedOpts {
31 public:
33  int nThreads;
34  int nPort;
36  bool fWipeBan;
38  std::string mbox;
39  std::string ns;
40  std::string host;
41  std::string tor;
42  std::string ip_addr;
43  std::string ipv4_proxy;
44  std::string ipv6_proxy;
45  std::set<uint64_t> filter_whitelist;
46 
54 
55  int ParseCommandLine(int argc, const char **argv);
56 
57  void SetupSeederArgs();
58 };
59 
60 } // namespace seeder
61 
62 #endif // BITCOIN_SEEDER_OPTIONS_H
seeder::CDnsSeedOpts::tor
std::string tor
Definition: options.h:41
seeder::DEFAULT_WIPE_BAN
static const bool DEFAULT_WIPE_BAN
Definition: options.h:20
seeder::CDnsSeedOpts::nPort
int nPort
Definition: options.h:34
seeder::CDnsSeedOpts::ParseCommandLine
int ParseCommandLine(int argc, const char **argv)
Definition: options.cpp:15
seeder::CDnsSeedOpts::SetupSeederArgs
void SetupSeederArgs()
Definition: options.cpp:82
seeder::CDnsSeedOpts::fWipeBan
bool fWipeBan
Definition: options.h:36
seeder::DEFAULT_LISTEN_ADDRESS
static const std::string DEFAULT_LISTEN_ADDRESS
Definition: options.h:26
seeder::DEFAULT_TOR_PROXY
static const std::string DEFAULT_TOR_PROXY
Definition: options.h:25
seeder::DEFAULT_NUM_THREADS
static const int DEFAULT_NUM_THREADS
Definition: options.h:17
seeder::DEFAULT_IPV6_PROXY
static const std::string DEFAULT_IPV6_PROXY
Definition: options.h:28
seeder::CDnsSeedOpts::fWipeIgnore
bool fWipeIgnore
Definition: options.h:37
seeder::DEFAULT_PORT
static const int DEFAULT_PORT
Definition: options.h:18
seeder::CDnsSeedOpts::argsManager
ArgsManager * argsManager
Definition: options.h:32
seeder::DEFAULT_EMAIL
static const std::string DEFAULT_EMAIL
Definition: options.h:22
seeder::DEFAULT_NUM_DNS_THREADS
static const int DEFAULT_NUM_DNS_THREADS
Definition: options.h:19
seeder::CDnsSeedOpts
Definition: options.h:30
seeder::CDnsSeedOpts::ip_addr
std::string ip_addr
Definition: options.h:42
seeder::DEFAULT_HOST
static const std::string DEFAULT_HOST
Definition: options.h:24
seeder::CDnsSeedOpts::filter_whitelist
std::set< uint64_t > filter_whitelist
Definition: options.h:45
seeder::DEFAULT_NAMESERVER
static const std::string DEFAULT_NAMESERVER
Definition: options.h:23
seeder::CDnsSeedOpts::CDnsSeedOpts
CDnsSeedOpts(ArgsManager *argsMan)
Definition: options.h:47
seeder::DEFAULT_IPV4_PROXY
static const std::string DEFAULT_IPV4_PROXY
Definition: options.h:27
seeder::CDnsSeedOpts::ns
std::string ns
Definition: options.h:39
seeder::CDnsSeedOpts::ipv6_proxy
std::string ipv6_proxy
Definition: options.h:44
seeder::CONTINUE_EXECUTION
static const int CONTINUE_EXECUTION
Definition: options.h:15
seeder::CDnsSeedOpts::nDnsThreads
int nDnsThreads
Definition: options.h:35
ArgsManager
Definition: system.h:148
seeder::CDnsSeedOpts::host
std::string host
Definition: options.h:40
seeder::CDnsSeedOpts::ipv4_proxy
std::string ipv4_proxy
Definition: options.h:43
seeder::CDnsSeedOpts::nThreads
int nThreads
Definition: options.h:33
seeder
Definition: options.cpp:13
seeder::CDnsSeedOpts::mbox
std::string mbox
Definition: options.h:38
seeder::DEFAULT_WIPE_IGNORE
static const bool DEFAULT_WIPE_IGNORE
Definition: options.h:21