diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index 5a6d6678115..3af790e7024 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -157,6 +157,7 @@ namespace eosio { chain_plugin* chain_plug; size_t just_send_it_max; bool send_whole_blocks; + int started_sessions; node_transaction_index local_txns; ordered_txn_ids pending_notify; @@ -263,8 +264,8 @@ namespace eosio { */ constexpr auto def_send_buffer_size_mb = 4; constexpr auto def_send_buffer_size = 1024*1024*def_send_buffer_size_mb; - constexpr auto def_max_clients = 20; // 0 for unlimited clients - constexpr auto def_conn_retry_wait = std::chrono::seconds (30); + constexpr auto def_max_clients = 25; // 0 for unlimited clients + constexpr auto def_conn_retry_wait = 30; constexpr auto def_txn_expire_wait = std::chrono::seconds (3); constexpr auto def_resp_expected_wait = std::chrono::seconds (1); constexpr auto def_sync_rec_span = 10; @@ -1184,6 +1185,9 @@ namespace eosio { ( "peer", c->peer_name())("error",err.message())); c->connecting = false; c->close(); + if (started_sessions == 0) { + connect (c); + } } } } ); @@ -1193,6 +1197,7 @@ namespace eosio { boost::asio::ip::tcp::no_delay option( true ); con->socket->set_option( option ); start_read_message( con ); + ++started_sessions; con->send_handshake( ); // for now, we can just use the application main loop. @@ -2166,6 +2171,8 @@ namespace eosio { ( "peer-private-key", boost::program_options::value>()->composing()->multitoken(), "Tuple of [PublicKey, WIF private key] (may specify multiple times)") ( "log-level-net-plugin", bpo::value()->default_value("info"), "Log level: one of 'all', 'debug', 'info', 'warn', 'error', or 'off'") + ( "max-clients", bpo::value()->default_value(def_max_clients), "Maximum number of clients from which connections are accepted, use 0 for no limit") + ( "connection-cleanup-period", bpo::value()->default_value(def_conn_retry_wait), "number of seconds to wait before cleaning up dead connections") ; } @@ -2206,12 +2213,15 @@ namespace eosio { my->sync_master.reset( new sync_manager( def_sync_rec_span ) ); - my->connector_period = def_conn_retry_wait; + my->connector_period = std::chrono::seconds(options.at("connection-cleanup-period").as()); my->txn_exp_period = def_txn_expire_wait; my->resp_expected_period = def_resp_expected_wait; my->just_send_it_max = def_max_just_send; + my->max_client_count = options.at("max-clients").as(); + my->max_client_count = def_max_clients; my->num_clients = 0; + my->started_sessions = 0; my->resolver = std::make_shared( std::ref( app().get_io_service() ) ); if(options.count("listen-endpoint")) { diff --git a/programs/launcher/main.cpp b/programs/launcher/main.cpp index c4f42029819..328f6deb413 100644 --- a/programs/launcher/main.cpp +++ b/programs/launcher/main.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -36,6 +37,7 @@ using boost::asio::ip::host_name; using bpo::options_description; using bpo::variables_map; + struct local_identity { vector addrs; vector names; @@ -238,7 +240,6 @@ eosd_def::mk_dot_label () { void eosd_def::set_host( host_def* h ) { host = h->host_name; - has_db = false; p2p_port = h->p2p_port(); http_port = h->http_port(); file_size = h->def_file_size; @@ -250,11 +251,7 @@ struct remote_deploy { string scp_cmd = "/usr/bin/scp"; string ssh_identity; string ssh_args; - string local_config_file = "temp_config"; -}; - -struct host_map_def { - map bindings; + bf::path local_config_file = "temp_config"; }; struct testnet_def { @@ -263,6 +260,21 @@ struct testnet_def { }; +struct server_name_def { + string ipaddr; + string name; + uint16_t instances; + server_name_def () : ipaddr(), name(), instances(1) {} +}; + +struct server_identities { + vector producer; + vector observer; + vector db; + string remote_eos_root; + remote_deploy ssh; +}; + struct node_rt_info { bool remote; string pid_file; @@ -300,25 +312,34 @@ struct launcher_def { bf::path genesis; bf::path output; bf::path host_map_file; + bf::path server_ident_file; + bf::path stage; + string data_dir_base; bool skip_transaction_signatures = false; string eosd_extra_args; testnet_def network; string alias_base; vector aliases; - host_map_def host_map; + vector bindings; + int per_host; last_run_def last_run; int start_delay; bool nogen; string launch_name; + string launch_time; + server_identities servers; void assign_name (eosd_def &node); void set_options (bpo::options_description &cli); void initialize (const variables_map &vmap); + void load_servers (); bool generate (); - void define_local (); + void define_network (); void bind_nodes (); + host_def *find_host (const string &name); + host_def *deploy_config_file (tn_node_def &node); void write_config_file (tn_node_def &node); void make_ring (); void make_star (); @@ -327,7 +348,7 @@ struct launcher_def { void write_dot_file (); 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); + void prep_remote_config_dir (eosd_def &node, host_def *host); void launch (eosd_def &node, string >s); void kill (launch_modes mode, string sig_opt); void start_all (string >s, launch_modes mode); @@ -347,6 +368,8 @@ launcher_def::set_options (bpo::options_description &cli) { ("delay,d",bpo::value(&start_delay)->default_value(0),"seconds delay before starting each node after the first") ("nogen",bpo::bool_switch(&nogen)->default_value(false),"launch nodes without writing new config files") ("host-map",bpo::value(&host_map_file)->default_value(""),"a file containing mapping specific nodes to hosts. Used to enhance the custom shape argument") + ("servers",bpo::value(&server_ident_file)->default_value(""),"a file containing ip addresses and names of individual servers to deploy as producers or observers ") + ("per-host",bpo::value(&per_host)->default_value(0),"specifies how many eosd instances will run on a single host. Use 0 to indicate all on one.") ; } @@ -376,6 +399,13 @@ launcher_def::initialize (const variables_map &vmap) { } } + using namespace std::chrono; + system_clock::time_point now = system_clock::now(); + std::time_t now_c = system_clock::to_time_t(now); + ostrstream dstrm; + dstrm << std::put_time(std::localtime(&now_c), "%Y_%m_%d_%H_%M_%S") << ends; + launch_time = dstrm.str(); + if ( ! (shape.empty() || boost::iequals( shape, "ring" ) || boost::iequals( shape, "star" ) || @@ -387,9 +417,11 @@ launcher_def::initialize (const variables_map &vmap) { if( !host_map_file.empty() ) { try { - fc::json::from_file(host_map_file).as(host_map); - for (auto &binding : host_map.bindings) { - for (auto &eosd : binding.second.instances) { + fc::json::from_file(host_map_file).as>(bindings); + for (auto &binding : bindings) { + for (auto &eosd : binding.instances) { + eosd.host = binding.host_name; + eosd.p2p_endpoint = binding.public_name + ":" + boost::lexical_cast(eosd.p2p_port); aliases.push_back (eosd.name); } } @@ -402,19 +434,49 @@ launcher_def::initialize (const variables_map &vmap) { alias_base = "testnet_"; next_node = 0; + load_servers (); + if (prod_nodes > producers) prod_nodes = producers; if (prod_nodes > total_nodes) total_nodes = prod_nodes; - if (host_map.bindings.empty()) { - define_local (); + if (bindings.empty()) { + define_network (); } } +void +launcher_def::load_servers () { + if (!server_ident_file.empty()) { + try { + fc::json::from_file(server_ident_file).as(servers); + size_t nodes = 0; + for (auto &s : servers.producer) { + nodes += s.instances; + } + prod_nodes = nodes; + nodes = 0; + for (auto &s : servers.observer) { + nodes += s.instances; + } + + total_nodes = prod_nodes + nodes; + per_host = 1; + network.ssh_helper = servers.ssh; + } + catch (...) { + cerr << "unable to load server identity file " << server_ident_file << endl; + exit (-1); + } + } +} + + void launcher_def::assign_name (eosd_def &node) { - string dex = boost::lexical_cast(next_node++); + string dex = next_node < 10 ? "0":""; + dex += boost::lexical_cast(next_node++); node.name = alias_base + dex; node.data_dir = data_dir_base + dex; } @@ -439,11 +501,11 @@ launcher_def::generate () { for (auto &node : network.nodes) { write_config_file(node.second); } - write_dot_file (); } + write_dot_file (); if (!output.empty()) { - bf::path savefile = output; + bf::path savefile = output; { bf::ofstream sf (savefile); @@ -458,14 +520,12 @@ launcher_def::generate () { } { - bf::ofstream sf (savefile); - sf << fc::json::to_pretty_string (host_map) << endl; + sf << fc::json::to_pretty_string (bindings) << endl; sf.close(); } - - return false; + return false; } return true; } @@ -482,101 +542,223 @@ launcher_def::write_dot_file () { << "\" [dir=\"forward\"];" << std::endl; } } - #if 0 - // this is an experiment. I was thinking of adding a "notes" box but I - // can't figure out hot to force it to the lower left corner of the diagram - df << " { rank = sink;\n" - << " Notes [shape=none, margin=0, label=<\n" - << " \n" - << " \n" - << " \n" - << "
Data flow between nodes is bidirectional
Arrows point from client to server
\n" - << " >];" - << " }\n"; -#endif df << "}\n"; } void -launcher_def::define_local () { - host_def local_host; +launcher_def::define_network () { + char * erd = getenv ("EOS_ROOT_DIR"); if (erd == 0) { - cerr << "environment variable \"EOS_ROOT_DIR\" unset. defaulting to current dir" << endl; erd = getenv ("PWD"); } - local_host.eos_root_dir = erd; - local_host.genesis = genesis.string(); + stage = bf::path(erd); + if (!bf::exists(stage)) { + cerr << erd << " is not a valid path" << endl; + exit (-1); + } + stage /= bf::path("staging"); + bf::create_directory (stage); - for (size_t i = 0; i < total_nodes; i++) { - eosd_def eosd; + if (per_host == 0) { + host_def local_host; + local_host.eos_root_dir = erd; + local_host.genesis = genesis.string(); - assign_name(eosd); - aliases.push_back(eosd.name); - eosd.set_host (&local_host); - local_host.instances.emplace_back(move(eosd)); + for (size_t i = 0; i < total_nodes; i++) { + eosd_def eosd; + + assign_name(eosd); + aliases.push_back(eosd.name); + eosd.set_host (&local_host); + local_host.instances.emplace_back(move(eosd)); + } + bindings.emplace_back(move(local_host)); + } + else { + int ph_count = 0; + host_def *lhost = nullptr; + size_t host_ndx = 0; + size_t num_prod_addr = servers.producer.size(); + size_t num_observer_addr = servers.observer.size(); + for (size_t i = total_nodes; i > 0; i--) { + if (ph_count == 0) { + if (lhost) { + bindings.emplace_back(move(*lhost)); + delete lhost; + } + lhost = new host_def; + lhost->genesis = genesis.string(); + if (host_ndx < num_prod_addr ) { + lhost->host_name = servers.producer[host_ndx].ipaddr; + lhost->public_name = servers.producer[host_ndx].name; + ph_count = servers.producer[host_ndx].instances; + } + else if (host_ndx - num_prod_addr < num_observer_addr) { + size_t ondx = host_ndx - num_prod_addr; + lhost->host_name = servers.observer[ondx].ipaddr; + lhost->public_name = servers.observer[ondx].name; + ph_count = servers.observer[ondx].instances; + } + else { + string ext = host_ndx < 10 ? "0" : ""; + ext += boost::lexical_cast(host_ndx); + lhost->host_name = "pseudo_" + ext; + lhost->public_name = lhost->host_name; + ph_count = 1; + } + lhost->eos_root_dir = + (local_id.contains (lhost->host_name) || servers.remote_eos_root.empty()) ? + erd : servers.remote_eos_root; + + host_ndx++; + } + eosd_def eosd; + + assign_name(eosd); + eosd.has_db = false; + + if (servers.db.size()) { + for (auto &dbn : servers.db) { + if (lhost->host_name == dbn) { + eosd.has_db = true; + break; + } + } + } + aliases.push_back(eosd.name); + eosd.set_host (lhost); + lhost->instances.emplace_back(move(eosd)); + --ph_count; + } + bindings.emplace_back( move(*lhost) ); + delete lhost; } - host_map.bindings[local_host.host_name] = move(local_host); } + void launcher_def::bind_nodes () { int per_node = producers / prod_nodes; int extra = producers % prod_nodes; int i = 0; - for (auto &h : host_map.bindings) { - for (auto &inst : h.second.instances) { - tn_node_def node; - node.name = inst.name; - node.instance = &inst; - keypair kp; - node.keys.emplace_back (move(kp)); - if (i < prod_nodes) { - int count = per_node; - if (extra) { - ++count; - --extra; - } - char ext = 'a' + i; - string pname = "init"; - while (count--) { - node.producers.push_back(pname + ext); - ext += prod_nodes; + for (auto &h : bindings) { + for (auto &inst : h.instances) { + tn_node_def node; + node.name = inst.name; + node.instance = &inst; + keypair kp; + node.keys.emplace_back (move(kp)); + if (i < prod_nodes) { + int count = per_node; + if (extra) { + ++count; + --extra; + } + char ext = 'a' + i; + string pname = "init"; + while (count--) { + node.producers.push_back(pname + ext); + ext += prod_nodes; + } } + network.nodes[node.name] = move(node); + inst.node = &network.nodes[inst.name]; + i++; } - network.nodes[node.name] = move(node); - inst.node = &network.nodes[inst.name]; - i++; + } +} + +host_def * +launcher_def::find_host (const string &name) +{ + host_def *host = nullptr; + for (auto &h : bindings) { + if (h.host_name == name) { + host = &h; + break; } } + if (host == 0) { + cerr << "could not find host for " << name << endl; + exit(-1); + } + return host; } -void -launcher_def::write_config_file (tn_node_def &node) { +host_def * +launcher_def::deploy_config_file (tn_node_def &node) { bf::path filename; boost::system::error_code ec; eosd_def &instance = *node.instance; - host_def *host = &host_map.bindings[instance.host]; + host_def *host = find_host (instance.host); + + bf::path source = stage / instance.data_dir / "config.ini"; if (host->is_local()) { bf::path dd = bf::path(host->eos_root_dir) / instance.data_dir; filename = dd / "config.ini"; if (bf::exists (dd)) { - int64_t count = bf::remove_all (dd, ec); + int64_t count = bf::remove_all (dd / "blocks", ec); if (ec.value() != 0) { cerr << "count = " << count << " could not remove old directory: " << dd << " " << strerror(ec.value()) << endl; exit (-1); } - } - if (!bf::create_directory (instance.data_dir, ec) && ec.value()) { + count = bf::remove_all (dd / "blockchain", ec); + if (ec.value() != 0) { + cerr << "count = " << count << " could not remove old directory: " << dd + << " " << strerror(ec.value()) << endl; + exit (-1); + } + + } else if (!bf::create_directory (instance.data_dir, ec) && ec.value()) { cerr << "could not create new directory: " << instance.data_dir << " errno " << ec.value() << " " << strerror(ec.value()) << endl; exit (-1); } + + bf::copy (source, filename); } else { - filename = network.ssh_helper.local_config_file; + prep_remote_config_dir (instance, host); + string scp_cmd_line = network.ssh_helper.scp_cmd + " "; + const string &args = host->ssh_args.length() ? host->ssh_args : network.ssh_helper.ssh_args; + if (args.length()) { + scp_cmd_line += args + " "; + } + scp_cmd_line += source.string() + " "; + + const string &uid = host->ssh_identity.length() ? host->ssh_identity : network.ssh_helper.ssh_identity; + if (uid.length()) { + scp_cmd_line += uid + "@"; + } + + bf::path dpath = bf::path (host->eos_root_dir) / instance.data_dir / "config.ini"; + scp_cmd_line += host->host_name + ":" + dpath.string(); + + cerr << "cmdline = " << scp_cmd_line << endl; + int res = boost::process::system (scp_cmd_line); + if (res != 0) { + cerr << "unable to scp config file to host " << host->host_name << endl; + exit(-1); + } } + return host; +} + +void +launcher_def::write_config_file (tn_node_def &node) { + bf::path filename; + boost::system::error_code ec; + eosd_def &instance = *node.instance; + host_def *host = find_host (instance.host); + + bf::path dd = stage / instance.data_dir; + if (!bf::exists(dd)) { + bf::create_directory(dd); + } + + filename = dd / "config.ini"; bf::ofstream cfg(filename); if (!cfg.good()) { @@ -633,30 +815,6 @@ launcher_def::write_config_file (tn_node_def &node) { << "plugin = eosio::account_history_plugin\n" << "plugin = eosio::account_history_api_plugin\n"; cfg.close(); - if (!host->is_local()) { - prep_remote_config_dir (instance); - string scp_cmd_line = network.ssh_helper.scp_cmd + " "; - const string &args = host->ssh_args.length() ? host->ssh_args : network.ssh_helper.ssh_args; - if (args.length()) { - scp_cmd_line += args + " "; - } - scp_cmd_line += filename.string() + " "; - - const string &uid = host->ssh_identity.length() ? host->ssh_identity : network.ssh_helper.ssh_identity; - if (uid.length()) { - scp_cmd_line += uid + "@"; - } - - bf::path dpath = bf::path (host->eos_root_dir) / instance.data_dir / "config.ini"; - scp_cmd_line += host->host_name + ":" + dpath.string(); - - cerr << "cmdline = " << scp_cmd_line << endl; - int res = boost::process::system (scp_cmd_line); - if (res != 0) { - cerr << "unable to scp config file to host " << host->host_name << endl; - exit(-1); - } - } } void @@ -684,7 +842,7 @@ launcher_def::make_star () { size_t links = 3; if (total_nodes > 12) { - links = (size_t)sqrt(total_nodes); + links = static_cast(sqrt(total_nodes)) + 2; } size_t gap = total_nodes > 6 ? 3 : (total_nodes - links)/2 +1; while (total_nodes % gap == 0) { @@ -722,7 +880,7 @@ launcher_def::make_star () { } } // if already established, don't add to list - if (peers_to_from[peer].count(current_name) == 0) { + if (peers_to_from[peer].count(current_name) < 2) { current.peers.push_back(peer); // current_name -> peer // keep track of bidirectional relationships to prevent duplicates peers_to_from[current_name].insert(peer); @@ -744,7 +902,7 @@ launcher_def::make_mesh () { size_t ndx = (i + j) % total_nodes; const auto& peer = aliases[ndx]; // if already established, don't add to list - if (peers_to_from[peer].count(current_name) == 0) { + if (peers_to_from[peer].count(current_name) < 2) { current.peers.push_back (peer); // keep track of bidirectional relationships to prevent duplicates peers_to_from[current_name].insert(peer); @@ -757,8 +915,8 @@ void launcher_def::make_custom () { bf::path source = shape; fc::json::from_file(source).as(network); - for (auto &h : host_map.bindings) { - for (auto &inst : h.second.instances) { + for (auto &h : bindings) { + for (auto &inst : h.instances) { tn_node_def *node = &network.nodes[inst.name]; node->instance = &inst; inst.node = node; @@ -791,8 +949,7 @@ launcher_def::do_ssh (const string &cmd, const string &host_name) { } void -launcher_def::prep_remote_config_dir (eosd_def &node) { - host_def* host = &host_map.bindings[node.host]; +launcher_def::prep_remote_config_dir (eosd_def &node, host_def *host) { bf::path abs_data_dir = bf::path(host->eos_root_dir) / node.data_dir; string add = abs_data_dir.string(); string cmd = "cd " + host->eos_root_dir; @@ -821,13 +978,15 @@ launcher_def::prep_remote_config_dir (eosd_def &node) { } void -launcher_def::launch (eosd_def &node, string >s) { - bf::path dd = node.data_dir; +launcher_def::launch (eosd_def &instance, string >s) { + bf::path dd = instance.data_dir; bf::path reout = dd / "stdout.txt"; - bf::path reerr = dd / "stderr.txt"; + bf::path reerr_sl = dd / "stderr.txt"; + bf::path reerr_base = bf::path("stderr." + launch_time + ".txt"); + bf::path reerr = dd / reerr_base; bf::path pidf = dd / "eosd.pid"; - host_def* host = &host_map.bindings[node.host]; + host_def* host = deploy_config_file (*instance.node); node_rt_info info; info.remote = !host->is_local(); @@ -838,15 +997,17 @@ launcher_def::launch (eosd_def &node, string >s) { } eosdcmd += eosd_extra_args + " "; eosdcmd += "--enable-stale-production true "; - eosdcmd += "--data-dir " + node.data_dir; + eosdcmd += "--data-dir " + instance.data_dir; if (gts.length()) { eosdcmd += " --genesis-timestamp " + gts; } - if (info.remote) { + if (!host->is_local()) { string cmdl ("cd "); cmdl += host->eos_root_dir + "; nohup " + eosdcmd + " > " - + reout.string() + " 2> " + reerr.string() + "& echo $! > " + pidf.string(); + + reout.string() + " 2> " + reerr.string() + "& echo $! > " + pidf.string() + + "; rm -f " + reerr_sl.string() + + "; ln -s " + reerr_base.string() + " " + reerr_sl.string(); if (!do_ssh (cmdl, host->host_name)){ cerr << "Unable to invoke " << cmdl << " on host " << host->host_name << endl; @@ -860,6 +1021,8 @@ launcher_def::launch (eosd_def &node, string >s) { cerr << "spawning child, " << eosdcmd << endl; bp::child c(eosdcmd, bp::std_out > reout, bp::std_err > reerr ); + bf::remove(reerr_sl); + bf::create_symlink (reerr_base, reerr_sl); bf::ofstream pidout (pidf); pidout << c.id() << flush; @@ -923,10 +1086,10 @@ launcher_def::start_all (string >s, launch_modes mode) { case LM_ALL: case LM_REMOTE: case LM_LOCAL: { - for (auto &h : host_map.bindings ) { + for (auto &h : bindings ) { if (mode == LM_ALL || - (h.second.is_local() ? mode == LM_LOCAL : mode == LM_REMOTE)) { - for (auto &inst : h.second.instances) { + (h.is_local() ? mode == LM_LOCAL : mode == LM_REMOTE)) { + for (auto &inst : h.instances) { try { launch (inst, gts); } catch (...) { @@ -1040,14 +1203,16 @@ FC_REFLECT( host_def, (instances) ) FC_REFLECT( eosd_def, - (name)(data_dir)(has_db)(host)(p2p_endpoint) + (name)(data_dir)(has_db) (p2p_port)(http_port)(file_size) ) FC_REFLECT( tn_node_def, (name)(keys)(peers)(producers) ) FC_REFLECT( testnet_def, (ssh_helper)(nodes) ) -FC_REFLECT( host_map_def, (bindings) ) +FC_REFLECT( server_name_def, (ipaddr) (name) (instances) ) + +FC_REFLECT( server_identities, (producer) (observer) (db) (remote_eos_root) (ssh) ) FC_REFLECT( node_rt_info, (remote)(pid_file)(kill_cmd) ) diff --git a/tests/eosd_run_mongodb_test.sh b/tests/eosd_run_mongodb_test.sh index 04cea1a60ca..fbb2596bcbe 100755 --- a/tests/eosd_run_mongodb_test.sh +++ b/tests/eosd_run_mongodb_test.sh @@ -93,7 +93,7 @@ LOG_FILE=eosd_run_test.log programs/launcher/launcher --eosd "--plugin eosio::db_plugin --mongodb-uri $DB" verifyErrorCode "launcher" sleep 60 -count=`grep -c "generated block" tn_data_0/stderr.txt` +count=`grep -c "generated block" tn_data_00/stderr.txt` if [[ $count == 0 ]]; then error "FAILURE - no blocks produced" fi @@ -461,10 +461,10 @@ while [ "$NEXT_BLOCK_NUM" -le "$HEAD_BLOCK_NUM" ]; do NEXT_BLOCK_NUM=$((NEXT_BLOCK_NUM+1)) done -ASSERT_ERRORS="$(grep Assert tn_data_0/stderr.txt)" -count=`grep -c Assert tn_data_0/stderr.txt` +ASSERT_ERRORS="$(grep Assert tn_data_00/stderr.txt)" +count=`grep -c Assert tn_data_00/stderr.txt` if [ $count != 0 ]; then - error "FAILURE - Assert in tn_data_0/stderr.txt" + error "FAILURE - Assert in tn_data_00/stderr.txt" fi killAll diff --git a/tests/eosd_run_test.sh b/tests/eosd_run_test.sh index b8cffb35942..b25ad4f74d0 100755 --- a/tests/eosd_run_test.sh +++ b/tests/eosd_run_test.sh @@ -39,11 +39,11 @@ error() (>&2 echo $1) killAll echo ================================================================= - echo Contents of tn_data_0/config.ini: - cat tn_data_0/config.ini + echo Contents of tn_data_00/config.ini: + cat tn_data_00/config.ini echo ================================================================= - echo Contents of tn_data_0/stderr.txt: - cat tn_data_0/stderr.txt + echo Contents of tn_data_00/stderr.txt: + cat tn_data_00/stderr.txt echo ================================================================= echo Contents of test_walletd_output.log: cat test_walletd_output.log @@ -121,7 +121,7 @@ if [ "$SERVER" == "localhost" ]; then programs/launcher/launcher verifyErrorCode "launcher" sleep 7 - count=`grep -c "generated block" tn_data_0/stderr.txt` + count=`grep -c "generated block" tn_data_00/stderr.txt` if [[ $count == 0 ]]; then error "FAILURE - no blocks produced" fi @@ -492,10 +492,10 @@ while [ "$NEXT_BLOCK_NUM" -le "$HEAD_BLOCK_NUM" ]; do done if [ "$SERVER" == "localhost" ]; then - ASSERT_ERRORS="$(grep Assert tn_data_0/stderr.txt)" - count=`grep -c Assert tn_data_0/stderr.txt` + ASSERT_ERRORS="$(grep Assert tn_data_00/stderr.txt)" + count=`grep -c Assert tn_data_00/stderr.txt` if [ "$count" != "0" ]; then - error "FAILURE - Assert in tn_data_0/stderr.txt" + error "FAILURE - Assert in tn_data_00/stderr.txt" fi fi @@ -503,4 +503,3 @@ killAll cleanup echo "END" >> $TEST_OUTPUT echo SUCCESS! - diff --git a/tests/p2p_tests/sync/test.sh b/tests/p2p_tests/sync/test.sh index c01d2666e30..aba8285b90b 100755 --- a/tests/p2p_tests/sync/test.sh +++ b/tests/p2p_tests/sync/test.sh @@ -99,9 +99,9 @@ fi echo ERROR: $lines reports out of $total_nodes and prods = $prodsfound programs/launcher/launcher -k 15 echo ================================================================= -echo Contents of tn_data_0/config.ini: -cat tn_data_0/config.ini +echo Contents of tn_data_00/config.ini: +cat tn_data_00/config.ini echo ================================================================= -echo Contents of tn_data_0/stderr.txt: -cat tn_data_0/stderr.txt +echo Contents of tn_data_00/stderr.txt: +cat tn_data_00/stderr.txt exit 1