diff options
author | Determinant <[email protected]> | 2019-07-02 03:00:31 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-07-02 03:00:31 -0400 |
commit | c1bb07e65f550e043d9a387d3978e651a1b7a15d (patch) | |
tree | 610d501e893c1eead667e558fb58ee85109fd82f /src/hotstuff_client.cpp | |
parent | 7e91de67703a3a3eb292d1a2422acb15a10d4b95 (diff) |
enable TLS for replica-replica connections
Diffstat (limited to 'src/hotstuff_client.cpp')
-rw-r--r-- | src/hotstuff_client.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hotstuff_client.cpp b/src/hotstuff_client.cpp index 08f2a2e..9f7423d 100644 --- a/src/hotstuff_client.cpp +++ b/src/hotstuff_client.cpp @@ -156,13 +156,13 @@ int main(int argc, char **argv) { auto idx = opt_idx->get(); max_iter_num = opt_max_iter_num->get(); max_async_num = opt_max_async_num->get(); - std::vector<std::pair<std::string, std::string>> raw; + std::vector<std::string> raw; for (const auto &s: opt_replicas->get()) { auto res = salticidae::trim_all(salticidae::split(s, ",")); - if (res.size() != 2) + if (res.size() < 1) throw HotStuffError("format error"); - raw.push_back(std::make_pair(res[0], res[1])); + raw.push_back(res[0]); } if (!(0 <= idx && (size_t)idx < raw.size() && raw.size() > 0)) @@ -170,7 +170,7 @@ int main(int argc, char **argv) { cid = opt_cid->get() != -1 ? opt_cid->get() : idx; for (const auto &p: raw) { - auto _p = split_ip_port_cport(p.first); + auto _p = split_ip_port_cport(p); size_t _; replicas.push_back(NetAddr(NetAddr(_p.first).ip, htons(stoi(_p.second, &_)))); } |