aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2020-03-30 18:34:35 -0400
committerDeterminant <[email protected]>2020-03-30 18:34:35 -0400
commitb2ff24cf19b8c3497a35b8ea05e3a2809efc913f (patch)
treec822466fd91732aba038709c53950df4ba7c473f /examples
parentab5b9793e80c7235707eb33c67c92d55d8d18cca (diff)
add max_msg_size option
Diffstat (limited to 'examples')
-rw-r--r--examples/hotstuff_app.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/hotstuff_app.cpp b/examples/hotstuff_app.cpp
index 51baf26..7a5a72e 100644
--- a/examples/hotstuff_app.cpp
+++ b/examples/hotstuff_app.cpp
@@ -171,6 +171,7 @@ int main(int argc, char **argv) {
auto opt_clinworker = Config::OptValInt::create(8);
auto opt_cliburst = Config::OptValInt::create(1000);
auto opt_notls = Config::OptValFlag::create(false);
+ auto opt_max_msg_size = Config::OptValInt::create(4 << 20);
config.add_opt("block-size", opt_blk_size, Config::SET_VAL);
config.add_opt("parent-limit", opt_parent_limit, Config::SET_VAL);
@@ -192,6 +193,7 @@ int main(int argc, char **argv) {
config.add_opt("clinworker", opt_clinworker, Config::SET_VAL, 'M', "the number of threads for client network");
config.add_opt("cliburst", opt_cliburst, Config::SET_VAL, 'B', "");
config.add_opt("notls", opt_notls, Config::SWITCH_ON, 's', "disable TLS");
+ config.add_opt("max-msg-size", opt_max_msg_size, Config::SET_VAL, 'S', "the maximum message size");
config.add_opt("help", opt_help, Config::SWITCH_ON, 'h', "show this help info");
EventContext ec;
@@ -237,6 +239,7 @@ int main(int argc, char **argv) {
HotStuffApp::Net::Config repnet_config;
ClientNetwork<opcode_t>::Config clinet_config;
+ repnet_config.max_msg_size(opt_max_msg_size->get());
if (!opt_tls_privkey->get().empty() && !opt_notls->get())
{
auto tls_priv_key = new salticidae::PKey(