diff options
author | Determinant <ted.sybil@gmail.com> | 2019-04-17 14:54:24 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-04-17 14:54:24 -0400 |
commit | cbfda8ccc88789cd3c83c63b6e18693e7dea718d (patch) | |
tree | 98e114ecc4f923f7e435c7ab94524e512e94fc14 /src/hotstuff_app.cpp | |
parent | d859aa2cd2db03ef66f305a265ae908ef41d6a72 (diff) |
support auto client command for evaluation
Diffstat (limited to 'src/hotstuff_app.cpp')
-rw-r--r-- | src/hotstuff_app.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hotstuff_app.cpp b/src/hotstuff_app.cpp index 30d127b..be9d3cd 100644 --- a/src/hotstuff_app.cpp +++ b/src/hotstuff_app.cpp @@ -110,6 +110,16 @@ class HotStuffApp: public HotStuff { */ } +#ifdef HOTSTUFF_AUTOCLI + void do_demand_commands(size_t blk_size) override { + size_t ncli = client_conns.size(); + size_t bsize = (blk_size + ncli - 1) / ncli; + hotstuff::MsgDemandCmd mdc{bsize}; + for(const auto &conn: client_conns) + cn.send_msg(mdc, conn); + } +#endif + #ifdef HOTSTUFF_MSG_STAT std::unordered_set<conn_t> client_conns; void print_stat() const; |