aboutsummaryrefslogtreecommitdiff
path: root/src/chainparamsbase.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-24 21:11:48 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-29 09:59:51 +0300
commita5266d4546c444cfd6d36cb63d2df52ce9e689e2 (patch)
tree8dea4e5279318b6c43488f9817fea5a9667d48e9 /src/chainparamsbase.h
parentb3273cf4039d26e66ae58a8acb9d865461618d54 (diff)
net: Add alternative port for onion service
This change allows to distinguish incoming Tor connections from others.
Diffstat (limited to 'src/chainparamsbase.h')
-rw-r--r--src/chainparamsbase.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 9852446b3c..f34df4bfdc 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -27,12 +27,15 @@ public:
const std::string& DataDir() const { return strDataDir; }
int RPCPort() const { return nRPCPort; }
+ uint16_t OnionServiceTargetPort() const { return m_onion_service_target_port; }
CBaseChainParams() = delete;
- CBaseChainParams(const std::string& data_dir, int rpc_port) : nRPCPort(rpc_port), strDataDir(data_dir) {}
+ CBaseChainParams(const std::string& data_dir, int rpc_port, uint16_t onion_service_target_port)
+ : nRPCPort(rpc_port), m_onion_service_target_port(onion_service_target_port), strDataDir(data_dir) {}
private:
int nRPCPort;
+ const uint16_t m_onion_service_target_port;
std::string strDataDir;
};