diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hotstuff.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/hotstuff.cpp b/src/hotstuff.cpp index a59aa82..bd3a42d 100644 --- a/src/hotstuff.cpp +++ b/src/hotstuff.cpp @@ -250,7 +250,7 @@ bool HotStuffBase::conn_handler(const salticidae::ConnPool::conn_t &conn, bool c if (connected) { auto cert = conn->get_peer_cert(); - SALTICIDAE_LOG_INFO("%s", salticidae::get_hash(cert->get_der()).to_hex().c_str()); + //SALTICIDAE_LOG_INFO("%s", salticidae::get_hash(cert->get_der()).to_hex().c_str()); return (!cert) || valid_tls_certs.count(salticidae::get_hash(cert->get_der())); } return true; @@ -291,21 +291,21 @@ void HotStuffBase::print_stat() const { LOG_INFO("--- replica msg. (10s) ---"); size_t _nsent = 0; size_t _nrecv = 0; - for (const auto &replica: peers) - { - auto conn = pn.get_peer_conn(replica); - if (conn == nullptr) continue; - size_t ns = conn->get_nsent(); - size_t nr = conn->get_nrecv(); - size_t nsb = conn->get_nsentb(); - size_t nrb = conn->get_nrecvb(); - conn->clear_msgstat(); - LOG_INFO("%s: %u(%u), %u(%u), %u", - std::string(replica).c_str(), ns, nsb, nr, nrb, part_fetched_replica[replica]); - _nsent += ns; - _nrecv += nr; - part_fetched_replica[replica] = 0; - } + //for (const auto &replica: peers) + //{ + // auto conn = pn.get_peer_conn(replica); + // if (conn == nullptr) continue; + // size_t ns = conn->get_nsent(); + // size_t nr = conn->get_nrecv(); + // size_t nsb = conn->get_nsentb(); + // size_t nrb = conn->get_nrecvb(); + // conn->clear_msgstat(); + // LOG_INFO("%s: %u(%u), %u(%u), %u", + // std::string(replica).c_str(), ns, nsb, nr, nrb, part_fetched_replica[replica]); + // _nsent += ns; + // _nrecv += nr; + // part_fetched_replica[replica] = 0; + //} nsent += _nsent; nrecv += _nrecv; LOG_INFO("sent: %lu", _nsent); |