From 56a5a5570055208b5b791d0e11a49cf43a4a332e Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 1 Aug 2018 13:31:02 -0400 Subject: ... --- src/hotstuff_client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hotstuff_client.cpp') diff --git a/src/hotstuff_client.cpp b/src/hotstuff_client.cpp index e213e78..bee8abd 100644 --- a/src/hotstuff_client.cpp +++ b/src/hotstuff_client.cpp @@ -55,7 +55,7 @@ void try_send() { while (waiting.size() < max_async_num && max_iter_num) { auto cmd = CommandDummy::make_cmd(); - mn.send_msg(MsgReqCmd(*cmd), conns.find(proposer)->second); + mn.send_msg(MsgReqCmd(*cmd), *conns.at(proposer)); HOTSTUFF_LOG_INFO("send new cmd %.10s", get_hex(cmd->get_hash()).c_str()); waiting.insert(std::make_pair( @@ -65,7 +65,7 @@ void try_send() { } } -void client_resp_cmd_handler(MsgRespCmd &&msg, MsgNetwork::conn_t) { +void client_resp_cmd_handler(MsgRespCmd &&msg, MsgNetwork::Conn &) { auto &fin = msg.fin; HOTSTUFF_LOG_DEBUG("got %s", std::string(msg.fin).c_str()); const uint256_t &cmd_hash = fin.cmd_hash; @@ -78,7 +78,7 @@ void client_resp_cmd_handler(MsgRespCmd &&msg, MsgNetwork::conn_t) { if (fin.rid != it->second.rid) { mn.send_msg(MsgReqCmd(*(waiting.find(cmd_hash)->second.cmd)), - conns.find(proposer)->second); + *conns.at(proposer)); HOTSTUFF_LOG_INFO("resend cmd %.10s", get_hex(cmd_hash).c_str()); it->second.et.start(); -- cgit v1.2.3-70-g09d2