提交 41891922 编写于 作者: A Alessandro Siniscalchi

style refactoring

上级 6660e5a9
......@@ -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 &gts);
void launch (const string &eosd_binary, eosd_def &node, string &gts);
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 &gts, launch_modes mode);
void start_all (const string &eosd_binary, string &gts, 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 &gts) {
launcher_def::launch (const std::string& eosd_binary, eosd_def &instance, string &gts) {
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 &gts, launch_modes mode) {
launcher_def::start_all (const std::string& eosd_binary, string &gts, launch_modes mode) {
switch (mode) {
case LM_NONE:
return;
......@@ -1290,7 +1290,7 @@ launcher_def::start_all (const std::string& eosdBinary, string &gts, 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 &gts, 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<string>(&kill_arg),"The launcher retrieves the previously started process ids and issue a kill to each.")
("bounce", bpo::value<string>(&bounce_nodes),"comma-separated list of node numbers that will be restarted using the tn_bounce.sh script")
("roll", bpo::value<string>(&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<string>(&eosdBinary)->default_value("programs/eosd/eosd"),"path to eosd binary")
("eosd_binary", bpo::value<string>(&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;
......
......@@ -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`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册