net, refactor: Refactor CBaseChainParams::RPCPort function

pull/764/head
Hennadii Stepanov 4 years ago
parent a5266d4546
commit fdd3ae4d26
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

@ -26,15 +26,15 @@ public:
///@}
const std::string& DataDir() const { return strDataDir; }
int RPCPort() const { return nRPCPort; }
uint16_t RPCPort() const { return m_rpc_port; }
uint16_t OnionServiceTargetPort() const { return m_onion_service_target_port; }
CBaseChainParams() = delete;
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) {}
CBaseChainParams(const std::string& data_dir, uint16_t rpc_port, uint16_t onion_service_target_port)
: m_rpc_port(rpc_port), m_onion_service_target_port(onion_service_target_port), strDataDir(data_dir) {}
private:
int nRPCPort;
const uint16_t m_rpc_port;
const uint16_t m_onion_service_target_port;
std::string strDataDir;
};

Loading…
Cancel
Save