From 418919222befb2cef0338ca436703666310b982c Mon Sep 17 00:00:00 2001 From: Alessandro Siniscalchi Date: Thu, 18 Jan 2018 15:54:44 +0100 Subject: [PATCH] style refactoring --- programs/launcher/main.cpp | 20 ++++++++++---------- tests/eosd_run_test.sh | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/programs/launcher/main.cpp b/programs/launcher/main.cpp index bf6e0ab0e..d9eb62ace 100644 --- a/programs/launcher/main.cpp +++ b/programs/launcher/main.cpp @@ -372,12 +372,12 @@ struct launcher_def { void format_ssh (const string &cmd, const string &host_name, string &ssh_cmd_line); bool do_ssh (const string &cmd, const string &host_name); void prep_remote_config_dir (eosd_def &node, host_def *host); - void launch (const string &eosdBinary, eosd_def &node, string >s); + void launch (const string &eosd_binary, eosd_def &node, string >s); void kill (launch_modes mode, string sig_opt); void bounce (const string& node_numbers); bool bounce_node (uint16_t num); void roll (const string& host_names); - void start_all (const string &eosdBinary, string >s, launch_modes mode); + void start_all (const string &eosd_binary, string >s, launch_modes mode); }; void @@ -1098,7 +1098,7 @@ launcher_def::prep_remote_config_dir (eosd_def &node, host_def *host) { } void -launcher_def::launch (const std::string& eosdBinary, eosd_def &instance, string >s) { +launcher_def::launch (const std::string& eosd_binary, eosd_def &instance, string >s) { bf::path dd = instance.data_dir; bf::path reout = dd / "stdout.txt"; bf::path reerr_sl = dd / "stderr.txt"; @@ -1110,7 +1110,7 @@ launcher_def::launch (const std::string& eosdBinary, eosd_def &instance, string node_rt_info info; info.remote = !host->is_local(); - string eosdcmd(eosdBinary); + string eosdcmd(eosd_binary); if (skip_transaction_signatures) { eosdcmd += " --skip-transaction-signatures"; @@ -1279,7 +1279,7 @@ launcher_def::roll (const string& host_names) { } void -launcher_def::start_all (const std::string& eosdBinary, string >s, launch_modes mode) { +launcher_def::start_all (const std::string& eosd_binary, string >s, launch_modes mode) { switch (mode) { case LM_NONE: return; @@ -1290,7 +1290,7 @@ launcher_def::start_all (const std::string& eosdBinary, string >s, launch_mode try { add_enable_stale_production = false; auto node = network.nodes.find(launch_name); - launch(eosdBinary, *node->second.instance, gts); + launch(eosd_binary, *node->second.instance, gts); } catch (fc::exception& fce) { cerr << "unable to launch " << launch_name << " fc::exception=" << fce.to_detail_string() << endl; } catch (std::exception& stde) { @@ -1310,7 +1310,7 @@ launcher_def::start_all (const std::string& eosdBinary, string >s, launch_mode for (auto &inst : h.instances) { try { std::cout << "launching " << gts << std::endl; - launch (eosdBinary, inst, gts); + launch (eosd_binary, inst, gts); } catch (fc::exception& fce) { cerr << "unable to launch " << inst.name << " fc::exception=" << fce.to_detail_string() << endl; } catch (std::exception& stde) { @@ -1344,7 +1344,7 @@ int main (int argc, char *argv[]) { string kill_arg; string bounce_nodes; string roll_nodes; - string eosdBinary; + string eosd_binary; local_id.initialize(); top.set_options(opts); @@ -1355,7 +1355,7 @@ int main (int argc, char *argv[]) { ("kill,k", bpo::value(&kill_arg),"The launcher retrieves the previously started process ids and issue a kill to each.") ("bounce", bpo::value(&bounce_nodes),"comma-separated list of node numbers that will be restarted using the tn_bounce.sh script") ("roll", bpo::value(&roll_nodes),"comma-separated list of host names where the nodes should be rolled to a new version using the tn_roll.sh script") - ("eosdBinary", bpo::value(&eosdBinary)->default_value("programs/eosd/eosd"),"path to eosd binary") + ("eosd_binary", bpo::value(&eosd_binary)->default_value("programs/eosd/eosd"),"path to eosd binary") ("version,v", "print version information") ("help,h","print this list"); @@ -1411,7 +1411,7 @@ int main (int argc, char *argv[]) { } else { top.generate(); - top.start_all(eosdBinary, gts, mode); + top.start_all(eosd_binary, gts, mode); } } catch (bpo::unknown_option &ex) { cerr << ex.what() << endl; diff --git a/tests/eosd_run_test.sh b/tests/eosd_run_test.sh index c7834a51e..fb4afcf44 100755 --- a/tests/eosd_run_test.sh +++ b/tests/eosd_run_test.sh @@ -68,7 +68,7 @@ verifyErrorCode() killAll() { if [ "$SERVER" == "localhost" ]; then - $DIR/programs/launcher/launcher -k 9 --eosdBinary $EOSD --genesis $DIR/genesis.json + $DIR/programs/launcher/launcher -k 9 --eosd_binary $EOSD --genesis $DIR/genesis.json fi kill -9 $WALLETD_PROC_ID } @@ -125,7 +125,7 @@ LOG_FILE=eosd_run_test.log # eosd if [ "$SERVER" == "localhost" ]; then - $DIR/programs/launcher/launcher --eosdBinary $EOSD --genesis $DIR/genesis.json + $DIR/programs/launcher/launcher --eosd_binary $EOSD --genesis $DIR/genesis.json verifyErrorCode "launcher" sleep 60 count=`grep -c "generated block" tn_data_00/stderr.txt` -- GitLab