Disable cmd params depending on compile flags

pull/253/head
SChernykh 1 year ago
parent 634039e551
commit d4a57370ef

@ -100,10 +100,12 @@ Params::Params(int argc, char* argv[])
ok = true;
}
#ifdef WITH_RANDOMX
if (strcmp(argv[i], "--no-randomx") == 0) {
m_disableRandomX = true;
ok = true;
}
#endif
if ((!strcmp(argv[i], "--out-peers") || !strcmp(argv[i], "--outpeers")) && (i + 1 < argc)) {
m_maxOutgoingPeers = std::min(std::max(strtoul(argv[++i], nullptr, 10), 10UL), 450UL);
@ -151,10 +153,12 @@ Params::Params(int argc, char* argv[])
ok = true;
}
#ifdef WITH_UPNP
if (strcmp(argv[i], "--no-upnp") == 0) {
m_upnp = false;
ok = true;
}
#endif
if (!ok) {
fprintf(stderr, "Unknown command line parameter %s\n\n", argv[i]);

@ -53,7 +53,11 @@ struct Params
std::string m_socks5Proxy;
bool m_dns = true;
uint32_t m_p2pExternalPort = 0;
#ifdef WITH_UPNP
bool m_upnp = true;
#else
bool m_upnp = false;
#endif
};
} // namespace p2pool

Loading…
Cancel
Save