From 8e0a449961a7d78546dd09deb20f3b16bb460988 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 23 Apr 2019 00:19:01 -0400 Subject: ... --- src/hotstuff_app.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/hotstuff_app.cpp b/src/hotstuff_app.cpp index be9d3cd..b1776f5 100644 --- a/src/hotstuff_app.cpp +++ b/src/hotstuff_app.cpp @@ -78,7 +78,9 @@ class HotStuffApp: public HotStuff { /** The listen address for client RPC */ NetAddr clisten_addr; +#if HOTSTUFF_CMD_RESPSIZE > 0 std::unordered_map unconfirmed; +#endif using conn_t = ClientNetwork::conn_t; @@ -100,14 +102,14 @@ class HotStuffApp: public HotStuff { #ifndef HOTSTUFF_ENABLE_BENCHMARK HOTSTUFF_LOG_INFO("replicated %s", std::string(fin).c_str()); #endif - /* +#if HOTSTUFF_CMD_RESPSIZE > 0 auto it = unconfirmed.find(fin.cmd_hash); if (it != unconfirmed.end()) { it->second.resolve(fin); unconfirmed.erase(it); } - */ +#endif } #ifdef HOTSTUFF_AUTOCLI @@ -311,9 +313,9 @@ void HotStuffApp::client_request_cmd_handler(MsgReqCmd &&msg, const conn_t &conn exec_command(cmd_hash).then([this, addr](Finality fin) { cn.send_msg(MsgRespCmd(fin), addr); }); +#if HOTSTUFF_CMD_RESPSIZE > 0 else { - /* auto it = unconfirmed.find(cmd_hash); if (it == unconfirmed.end()) it = unconfirmed.insert( @@ -321,8 +323,8 @@ void HotStuffApp::client_request_cmd_handler(MsgReqCmd &&msg, const conn_t &conn it->second.then([this, addr](const Finality &fin) { cn.send_msg(MsgRespCmd(std::move(fin)), addr); }); - */ } +#endif } void HotStuffApp::start(const std::vector> &reps) { -- cgit v1.2.3-70-g09d2