mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-03 17:29:24 +00:00
Added --no-cache
command line parameter
This commit is contained in:
parent
285560e120
commit
816a29c5ab
4 changed files with 7 additions and 1 deletions
|
@ -37,6 +37,7 @@ static void usage()
|
||||||
"--config Name of the p2pool config file\n"
|
"--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"
|
"--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"
|
"--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"
|
"--help Show this help message\n\n"
|
||||||
"Example command line:\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",
|
"%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)
|
P2PServer::P2PServer(p2pool* pool)
|
||||||
: TCPServer(P2PClient::allocate)
|
: TCPServer(P2PClient::allocate)
|
||||||
, m_pool(pool)
|
, m_pool(pool)
|
||||||
, m_cache(new BlockCache())
|
, m_cache(pool->params().m_blockCache ? new BlockCache() : nullptr)
|
||||||
, m_cacheLoaded(false)
|
, m_cacheLoaded(false)
|
||||||
, m_initialPeerList(pool->params().m_p2pPeerList)
|
, m_initialPeerList(pool->params().m_p2pPeerList)
|
||||||
, m_rd{}
|
, m_rd{}
|
||||||
|
|
|
@ -73,6 +73,10 @@ Params::Params(int argc, char* argv[])
|
||||||
if (strcmp(argv[i], "--stratum-api") == 0) {
|
if (strcmp(argv[i], "--stratum-api") == 0) {
|
||||||
m_localStats = true;
|
m_localStats = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmp(argv[i], "--no-cache") == 0) {
|
||||||
|
m_blockCache = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_stratumAddresses.empty()) {
|
if (m_stratumAddresses.empty()) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ struct Params
|
||||||
std::string m_config;
|
std::string m_config;
|
||||||
std::string m_apiPath;
|
std::string m_apiPath;
|
||||||
bool m_localStats = false;
|
bool m_localStats = false;
|
||||||
|
bool m_blockCache = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace p2pool
|
} // namespace p2pool
|
||||||
|
|
Loading…
Reference in a new issue