Skip to content

Commit

Permalink
Merge #553: Avoid onion listen port collision
Browse files Browse the repository at this point in the history
4dc3fc4 Avoid onion listen port collision (Jeremy Rand)

Pull request description:

  Refs #545

ACKs for top commit:
  domob1812:
    ACK 4dc3fc4.

Tree-SHA512: 05c3eaa572b236b1d3239313fc26089f40621eb6616915fc182975dfd030625f0963b35251f6d2334e2427366d5673c2ec610f7b056586fbbc8e994f739b4d4d
  • Loading branch information
domob1812 committed Nov 3, 2024
2 parents fd3bde4 + 4dc3fc4 commit a46c53a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/chainparamsbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ const CBaseChainParams& BaseParams()
}

/**
* Port numbers for incoming Tor connections (8334, 18334, 38334, 48334, 18445) have
* Port numbers for incoming Tor connections (8536, 18536, 38536, 48536, 18445) have
* been chosen arbitrarily to keep ranges of used ports tight.
*/
std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const ChainType chain)
{
switch (chain) {
case ChainType::MAIN:
return std::make_unique<CBaseChainParams>("", 8336, 8334);
return std::make_unique<CBaseChainParams>("", 8336, 8536);
case ChainType::TESTNET:
return std::make_unique<CBaseChainParams>("testnet3", 18336, 18334);
return std::make_unique<CBaseChainParams>("testnet3", 18336, 18536);
case ChainType::TESTNET4:
return std::make_unique<CBaseChainParams>("testnet4", 48336, 48334);
return std::make_unique<CBaseChainParams>("testnet4", 48336, 48536);
case ChainType::SIGNET:
return std::make_unique<CBaseChainParams>("signet", 38336, 38334);
return std::make_unique<CBaseChainParams>("signet", 38336, 38536);
case ChainType::REGTEST:
return std::make_unique<CBaseChainParams>("regtest", 18443, 18445);
}
Expand Down

0 comments on commit a46c53a

Please sign in to comment.