Added `--no-cache` command line parameter

pull/58/head
SChernykh 3 years ago
parent 285560e120
commit 816a29c5ab

@ -37,6 +37,7 @@ static void usage()
"--config Name of the p2pool config file\n"
"--data-api Path to the p2pool JSON data (use it in tandem with an external web-server)\n"
"--stratum-api Enable /local/ path in api path for Stratum Server statistics\n"
"--no-cache Disable p2pool.cache\n"
"--help Show this help message\n\n"
"Example command line:\n\n"
"%s --host 127.0.0.1 --rpc-port 18081 --zmq-port 18083 --wallet YOUR_WALLET_ADDRESS --stratum 0.0.0.0:%d --p2p 0.0.0.0:%d\n\n",

@ -42,7 +42,7 @@ namespace p2pool {
P2PServer::P2PServer(p2pool* pool)
: TCPServer(P2PClient::allocate)
, m_pool(pool)
, m_cache(new BlockCache())
, m_cache(pool->params().m_blockCache ? new BlockCache() : nullptr)
, m_cacheLoaded(false)
, m_initialPeerList(pool->params().m_p2pPeerList)
, m_rd{}

@ -73,6 +73,10 @@ Params::Params(int argc, char* argv[])
if (strcmp(argv[i], "--stratum-api") == 0) {
m_localStats = true;
}
if (strcmp(argv[i], "--no-cache") == 0) {
m_blockCache = false;
}
}
if (m_stratumAddresses.empty()) {

@ -38,6 +38,7 @@ struct Params
std::string m_config;
std::string m_apiPath;
bool m_localStats = false;
bool m_blockCache = true;
};
} // namespace p2pool

Loading…
Cancel
Save