aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hotstuff.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/hotstuff.cpp b/src/hotstuff.cpp
index bd3a42d..12a44dc 100644
--- a/src/hotstuff.cpp
+++ b/src/hotstuff.cpp
@@ -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);