diff options
author | Determinant <[email protected]> | 2019-04-23 00:19:01 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-04-23 00:19:01 -0400 |
commit | 8e0a449961a7d78546dd09deb20f3b16bb460988 (patch) | |
tree | 1103188d3e8e48b8c70e5004ebf00f21ea1c7761 /src | |
parent | cbfda8ccc88789cd3c83c63b6e18693e7dea718d (diff) |
...
Diffstat (limited to 'src')
-rw-r--r-- | src/hotstuff_app.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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<const uint256_t, promise_t> unconfirmed; +#endif using conn_t = ClientNetwork<opcode_t>::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<std::pair<NetAddr, bytearray_t>> &reps) { |