Skip to content

Commit 9db50a8

Browse files
authored
add connected external ip for mpc service (#125)
1 parent fcab9b4 commit 9db50a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpp/wedpr-helper/ppc-tools/src/config/PPCConfig.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,12 @@ void PPCConfig::loadMPCConfig(boost::property_tree::ptree const& _pt)
667667
m_mpcConfig.mpcRootPathNoGateway = _pt.get<std::string>("mpc.mpc_root_path_no_gateway", "./");
668668
m_mpcConfig.readPerBatchLines = _pt.get<std::uint64_t>("mpc.read_per_batch_lines", 100000);
669669
m_mpcConfig.spdzConnectedPort = _pt.get<int>("spdz.connected_port", 5894);
670-
m_mpcConfig.spdzConnectedIP = _pt.get<std::string>("transport.host_ip", "");
671670

671+
m_mpcConfig.spdzConnectedIP = _pt.get<std::string>("transport.connected_external_ip", "");
672+
if (m_mpcConfig.spdzConnectedIP.empty()) {
673+
m_mpcConfig.spdzConnectedIP = _pt.get<std::string>("transport.host_ip", "");
674+
}
675+
672676
PPCConfig_LOG(INFO) << LOG_DESC("spdzConnectedPort") << LOG_KV("spdzConnectedIP", m_mpcConfig.spdzConnectedIP) << LOG_KV("spdzConnectedPort", m_mpcConfig.spdzConnectedPort);
673677

674678
m_mpcConfig.threadPoolSize = _pt.get<int>("mpc.async_thread_pool_size", -1);

0 commit comments

Comments
 (0)