Added `--mini` command line option to connect to p2pool-mini

pull/117/head
SChernykh 2 years ago
parent 9f449320b5
commit ec2f4467fb

@ -68,6 +68,7 @@ This guide assumes that you run everything on the same machine. If it's not the
- You have to use the primary wallet address for mining. Subaddresses and integrated addresses are not supported, just like with monerod solo mining.
- Check that ports 18080 (Monero p2p port) and 37889 (p2pool p2p port) are open in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine.
- You can connect multiple miners to the same p2pool node. The more the better!
- Starting from p2pool v1.7, you can add `--mini` to p2pool command line to connect to the **p2pool-mini** sidechain. Note that it will also change the default p2p port from 37889 to 37888.
Step-by-step guide:

@ -44,11 +44,14 @@ static void usage()
"--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 1000)\n"
"--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 1000)\n"
"--start-mining N Start built-in miner using N threads (any value between 1 and 64)\n"
"--mini Connect to p2pool-mini sidechain. Note that it will also change default p2p port from %d to %d.\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",
p2pool::VERSION,
p2pool::log::MAX_GLOBAL_LOG_LEVEL,
p2pool::DEFAULT_P2P_PORT,
p2pool::DEFAULT_P2P_PORT_MINI,
#ifdef _WIN32
"p2pool.exe"
#else

@ -111,7 +111,7 @@ p2pool::p2pool(int argc, char* argv[])
m_api = m_params->m_apiPath.empty() ? nullptr : new p2pool_api(m_params->m_apiPath, m_params->m_localStats);
m_sideChain = new SideChain(this, type);
m_sideChain = new SideChain(this, type, m_params->m_mini ? "mini" : nullptr);
if (m_params->m_p2pAddresses.empty()) {
const int p2p_port = m_sideChain->is_mini() ? DEFAULT_P2P_PORT_MINI : DEFAULT_P2P_PORT;

@ -97,6 +97,10 @@ Params::Params(int argc, char* argv[])
if ((strcmp(argv[i], "--start-mining") == 0) && (i + 1 < argc)) {
m_minerThreads = std::min(std::max(strtoul(argv[++i], nullptr, 10), 1UL), 64UL);
}
if (strcmp(argv[i], "--mini") == 0) {
m_mini = true;
}
}
if (m_stratumAddresses.empty()) {

@ -43,6 +43,7 @@ struct Params
uint32_t m_maxOutgoingPeers = 10;
uint32_t m_maxIncomingPeers = 1000;
uint32_t m_minerThreads = 0;
bool m_mini = false;
};
} // namespace p2pool

Loading…
Cancel
Save