From b2ff24cf19b8c3497a35b8ea05e3a2809efc913f Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 30 Mar 2020 18:34:35 -0400 Subject: add max_msg_size option --- examples/hotstuff_app.cpp | 3 +++ salticidae | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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::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( diff --git a/salticidae b/salticidae index 53c1165..7452678 160000 --- a/salticidae +++ b/salticidae @@ -1 +1 @@ -Subproject commit 53c1165645ad4fa29fbab68440a69881922c28f4 +Subproject commit 7452678b64433378416e2c105254fa29fb21750c -- cgit v1.2.3-70-g09d2