提交 5df4a75a 编写于 作者: B Bart Wyatt

merging changes to master @6c355fbf ref EOSIO/eos#203

......@@ -8,7 +8,8 @@
*.wasm
*.s
*.dot
\#*
\.#*
CMakeCache.txt
CMakeFiles
cmake_install.cmake
......
......@@ -15,107 +15,107 @@
"name": "inita",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initb",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initc",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initd",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "inite",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initf",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initg",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "inith",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initi",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initj",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initk",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initl",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initm",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initn",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "inito",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initp",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initq",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initr",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "inits",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initt",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
},{
"name": "initu",
"owner_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"liquid_balance": "1000000.00000000 EOS"
"liquid_balance": "1000000.0000 EOS"
}],
"initial_producers": [{
"owner_name": "inita",
......
......@@ -45,7 +45,7 @@ const static AccountName ProducersAccountName = N(producers);
const static PermissionName ActiveName = N(active);
const static PermissionName OwnerName = N(owner);
const static ShareType InitialTokenSupply = Asset::fromString("90000000.00000000 EOS").amount;
const static ShareType InitialTokenSupply = Asset::fromString("90000000.0000 EOS").amount;
const static int BlockIntervalSeconds = 3;
......
......@@ -174,6 +174,7 @@ namespace eos { namespace chain {
generated_transaction_object_type,
producer_object_type,
chain_property_object_type,
account_control_history_object_type, ///< Defined by account_history_plugin
account_transaction_history_object_type, ///< Defined by account_history_plugin
transaction_history_object_type, ///< Defined by account_history_plugin
public_key_history_object_type, ///< Defined by account_history_plugin
......@@ -225,6 +226,7 @@ FC_REFLECT_ENUM(eos::chain::object_type,
(generated_transaction_object_type)
(producer_object_type)
(chain_property_object_type)
(account_control_history_object_type)
(account_transaction_history_object_type)
(transaction_history_object_type)
(public_key_history_object_type)
......
......@@ -3,7 +3,7 @@
#include <eos/types/native.hpp>
/// eos with 8 digits of precision
#define EOS_SYMBOL (int64_t(5) | (uint64_t('E') << 8) | (uint64_t('O') << 16) | (uint64_t('S') << 24))
#define EOS_SYMBOL (int64_t(4) | (uint64_t('E') << 8) | (uint64_t('O') << 16) | (uint64_t('S') << 24))
/// Defined to be largest power of 10 that fits in 53 bits of precision
#define EOS_MAX_SHARE_SUPPLY int64_t(1'000'000'000'000'000ll)
......
......@@ -41,7 +41,8 @@ void account_history_api_plugin::plugin_startup() {
app().get_plugin<http_plugin>().add_api({
CHAIN_RO_CALL(get_transaction),
CHAIN_RO_CALL(get_transactions),
CHAIN_RO_CALL(get_key_accounts)
CHAIN_RO_CALL(get_key_accounts),
CHAIN_RO_CALL(get_controlled_accounts)
});
}
......
#include <eos/account_history_plugin/account_history_plugin.hpp>
#include <eos/account_history_plugin/account_control_history_object.hpp>
#include <eos/account_history_plugin/account_transaction_history_object.hpp>
#include <eos/account_history_plugin/public_key_history_object.hpp>
#include <eos/account_history_plugin/transaction_history_object.hpp>
......@@ -25,6 +26,7 @@ namespace eos {
using chain::AccountName;
using chain::block_id_type;
using chain::PermissionName;
using chain::ProcessedTransaction;
using chain::signed_block;
using boost::multi_index_container;
......@@ -38,6 +40,7 @@ public:
ProcessedTransaction get_transaction(const chain::transaction_id_type& transaction_id) const;
get_transactions_results get_transactions(const AccountName& account_name, const optional<uint32_t>& skip_seq, const optional<uint32_t>& num_seq) const;
vector<AccountName> get_key_accounts(const public_key_type& public_key) const;
vector<AccountName> get_controlled_accounts(const AccountName& controlling_account) const;
void applied_block(const signed_block&);
chain_plugin* chain_plug;
......@@ -60,7 +63,20 @@ private:
bool is_scope_relevant(const eos::types::Vector<AccountName>& scope);
get_transactions_results ordered_transactions(const block_transaction_id_map& block_transaction_ids, const fc::time_point& start_time, const uint32_t begin, const uint32_t end) const;
static void add(chainbase::database& db, const vector<types::KeyPermissionWeight>& keys, const AccountName& account_name, const PermissionName& permission);
static void remove(chainbase::database& db, const AccountName& account_name, const PermissionName& permission);
template<typename MultiIndex, typename LookupType>
static void remove(chainbase::database& db, const AccountName& account_name, const PermissionName& permission)
{
const auto& idx = db.get_index<MultiIndex, LookupType>();
auto& mutatable_idx = db.get_mutable_index<MultiIndex>();
auto range = idx.equal_range( boost::make_tuple( account_name, permission ) );
for (auto acct_perm = range.first; acct_perm != range.second; ++acct_perm)
{
mutatable_idx.remove(*acct_perm);
}
}
static void add(chainbase::database& db, const vector<types::AccountPermissionWeight>& controlling_accounts, const AccountName& account_name, const PermissionName& permission);
bool time_exceeded(const fc::time_point& start_time) const;
static const AccountName NEW_ACCOUNT;
static const AccountName UPDATE_AUTH;
......@@ -252,6 +268,21 @@ vector<AccountName> account_history_plugin_impl::get_key_accounts(const public_k
return vector<AccountName>(accounts.begin(), accounts.end());
}
vector<AccountName> account_history_plugin_impl::get_controlled_accounts(const AccountName& controlling_account) const
{
std::set<AccountName> accounts;
const auto& db = chain_plug->chain().get_database();
db.with_read_lock( [&]() {
const auto& account_control_idx = db.get_index<account_control_history_multi_index, by_controlling>();
auto range = account_control_idx.equal_range( controlling_account );
for (auto obj = range.first; obj != range.second; ++obj)
{
accounts.insert(obj->controlled_account);
}
} );
return vector<AccountName>(accounts.begin(), accounts.end());
}
void account_history_plugin_impl::applied_block(const signed_block& block)
{
const auto block_id = block.id();
......@@ -286,22 +317,30 @@ void account_history_plugin_impl::applied_block(const signed_block& block)
if (msg.type == NEW_ACCOUNT)
{
const auto create = msg.as<types::newaccount>();
auto count = create.owner.keys.size() + create.active.keys.size() + create.recovery.keys.size();
add(db, create.owner.keys, create.name, OWNER);
add(db, create.active.keys, create.name, ACTIVE);
add(db, create.recovery.keys, create.name, RECOVERY);
add(db, create.owner.accounts, create.name, OWNER);
add(db, create.active.accounts, create.name, ACTIVE);
add(db, create.recovery.accounts, create.name, RECOVERY);
}
else if (msg.type == UPDATE_AUTH)
{
const auto update = msg.as<types::updateauth>();
remove(db, update.account, update.permission);
remove<public_key_history_multi_index, by_account_permission>(db, update.account, update.permission);
add(db, update.authority.keys, update.account, update.permission);
remove<account_control_history_multi_index, by_controlled_authority>(db, update.account, update.permission);
add(db, update.authority.accounts, update.account, update.permission);
}
else if (msg.type == DELETE_AUTH)
{
const auto del = msg.as<types::deleteauth>();
remove(db, del.account, del.permission);
}
remove<public_key_history_multi_index, by_account_permission>(db, del.account, del.permission);
remove<account_control_history_multi_index, by_controlled_authority>(db, del.account, del.permission);
}
}
}
}
......@@ -321,15 +360,15 @@ void account_history_plugin_impl::add(chainbase::database& db, const vector<type
}
}
void account_history_plugin_impl::remove(chainbase::database& db, const AccountName& account_name, const PermissionName& permission)
void account_history_plugin_impl::add(chainbase::database& db, const vector<types::AccountPermissionWeight>& controlling_accounts, const AccountName& account_name, const PermissionName& permission)
{
const auto& acct_perm_idx = db.get_index<public_key_history_multi_index, by_account_permission>();
auto& mutatable_acct_perm_idx = db.get_mutable_index<public_key_history_multi_index>();
auto range = acct_perm_idx.equal_range( boost::make_tuple( account_name, permission ) );
for (auto acct_perm = range.first; acct_perm != range.second; ++acct_perm)
for (auto controlling_account : controlling_accounts )
{
mutatable_acct_perm_idx.remove(*acct_perm);
db.create<account_control_history_object>([&](account_control_history_object& obj) {
obj.controlled_account = account_name;
obj.controlled_permission = permission;
obj.controlling_account = controlling_account.permission.account;
});
}
}
......@@ -378,6 +417,7 @@ void account_history_plugin::plugin_startup()
{
my->chain_plug = app().find_plugin<chain_plugin>();
auto& db = my->chain_plug->chain().get_mutable_database();
db.add_index<account_control_history_multi_index>();
db.add_index<account_transaction_history_multi_index>();
db.add_index<public_key_history_multi_index>();
db.add_index<transaction_history_multi_index>();
......@@ -408,5 +448,11 @@ read_only::get_key_accounts_results read_only::get_key_accounts(const get_key_ac
{
return { account_history->get_key_accounts(params.public_key) };
}
read_only::get_controlled_accounts_results read_only::get_controlled_accounts(const get_controlled_accounts_params& params) const
{
return { account_history->get_controlled_accounts(params.controlling_account) };
}
} // namespace account_history_apis
} // namespace eos
#pragma once
#include <chainbase/chainbase.hpp>
#include <eos/chain/types.hpp>
namespace eos {
using chain::AccountName;
using chain::PermissionName;
using chain::shared_vector;
using chain::transaction_id_type;
using namespace boost::multi_index;
class account_control_history_object : public chainbase::object<chain::account_control_history_object_type, account_control_history_object> {
OBJECT_CTOR(account_control_history_object)
id_type id;
AccountName controlled_account;
PermissionName controlled_permission;
AccountName controlling_account;
};
struct by_id;
struct by_controlling;
struct by_controlled_authority;
using account_control_history_multi_index = chainbase::shared_multi_index_container<
account_control_history_object,
indexed_by<
ordered_unique<tag<by_id>, BOOST_MULTI_INDEX_MEMBER(account_control_history_object, account_control_history_object::id_type, id)>,
hashed_non_unique<tag<by_controlling>, BOOST_MULTI_INDEX_MEMBER(account_control_history_object, AccountName, controlling_account), std::hash<AccountName>>,
hashed_non_unique<tag<by_controlled_authority>,
composite_key< account_control_history_object,
member<account_control_history_object, AccountName, &account_control_history_object::controlled_account>,
member<account_control_history_object, PermissionName, &account_control_history_object::controlled_permission>
>,
composite_key_hash< std::hash<AccountName>, std::hash<PermissionName> >
>
>
>;
typedef chainbase::generic_index<account_control_history_multi_index> account_control_history_index;
}
CHAINBASE_SET_INDEX_TYPE( eos::account_control_history_object, eos::account_control_history_multi_index )
FC_REFLECT( eos::account_control_history_object, (controlled_account)(controlled_permission)(controlling_account) )
......@@ -26,6 +26,7 @@ public:
read_only(account_history_const_ptr&& account_history)
: account_history(account_history) {}
struct get_transaction_params {
chain::transaction_id_type transaction_id;
};
......@@ -35,6 +36,7 @@ public:
};
get_transaction_results get_transaction(const get_transaction_params& params) const;
struct get_transactions_params {
chain::AccountName account_name;
optional<uint32_t> skip_seq;
......@@ -52,6 +54,7 @@ public:
get_transactions_results get_transactions(const get_transactions_params& params) const;
struct get_key_accounts_params {
chain::public_key_type public_key;
};
......@@ -59,6 +62,15 @@ public:
vector<chain::AccountName> account_names;
};
get_key_accounts_results get_key_accounts(const get_key_accounts_params& params) const;
struct get_controlled_accounts_params {
chain::AccountName controlling_account;
};
struct get_controlled_accounts_results {
vector<chain::AccountName> controlled_accounts;
};
get_controlled_accounts_results get_controlled_accounts(const get_controlled_accounts_params& params) const;
};
class read_write {
......@@ -99,3 +111,5 @@ FC_REFLECT(eos::account_history_apis::read_only::ordered_transaction_results, (s
FC_REFLECT(eos::account_history_apis::read_only::get_transactions_results, (transactions)(time_limit_exceeded_error) )
FC_REFLECT(eos::account_history_apis::read_only::get_key_accounts_params, (public_key) )
FC_REFLECT(eos::account_history_apis::read_only::get_key_accounts_results, (account_names) )
FC_REFLECT(eos::account_history_apis::read_only::get_controlled_accounts_params, (controlling_account) )
FC_REFLECT(eos::account_history_apis::read_only::get_controlled_accounts_results, (controlled_accounts) )
......@@ -19,7 +19,6 @@ namespace eos {
void plugin_shutdown();
void broadcast_block(const chain::signed_block &sb);
void broadcast_transaction (const chain::SignedTransaction &txn);
private:
std::unique_ptr<class net_plugin_impl> my;
......
......@@ -6,7 +6,7 @@ namespace eos {
using namespace chain;
using namespace fc;
struct handshake_message {
struct handshake_message {
int16_t network_version = 0;
chain_id_type chain_id; ///< used to identify chain
fc::sha256 node_id; ///< used to identify peers and prevent self-connect
......@@ -41,7 +41,7 @@ namespace eos {
};
struct peer_message {
vector<fc::ip::endpoint> peers;
vector<fc::sha256> peers;
};
using net_message = static_variant<handshake_message,
......
此差异已折叠。
......@@ -223,7 +223,7 @@ struct launcher_def {
bool do_ssh (const string &cmd, const string &hostname);
void prep_remote_config_dir (eosd_def &node);
void launch (eosd_def &node, string &gts);
void kill (launch_modes mode);
void kill (launch_modes mode, string sig_opt);
void start_all (string &gts, launch_modes mode);
};
......@@ -544,7 +544,7 @@ launcher_def::launch (eosd_def &node, string &gts) {
node_rt_info info;
info.remote = node.remote;
string eosdcmd = "programs/eosd/eosd --data-dir " + node.data_dir;
string eosdcmd = "programs/eosd/eosd --skip-transaction-signatures --data-dir " + node.data_dir;
if (gts.length()) {
eosdcmd += " --genesis-timestamp " + gts;
}
......@@ -559,7 +559,7 @@ launcher_def::launch (eosd_def &node, string &gts) {
exit (-1);
}
string cmd = "cd node.eos_root_dir; kill -TERM `cat " + pidf.string() + "`";
string cmd = "cd node.eos_root_dir; kill -9 `cat " + pidf.string() + "`";
format_ssh (cmd, node.hostname, info.kill_cmd);
}
else {
......@@ -586,7 +586,7 @@ launcher_def::launch (eosd_def &node, string &gts) {
}
void
launcher_def::kill (launch_modes mode) {
launcher_def::kill (launch_modes mode, string sig_opt) {
if (mode == LM_NONE) {
return;
}
......@@ -598,7 +598,7 @@ launcher_def::kill (launch_modes mode) {
if (info.pid_file.length()) {
string pid;
fc::json::from_file(info.pid_file).as<string>(pid);
string kill_cmd = "kill -TERM " + pid;
string kill_cmd = "kill " + sig_opt + " " + pid;
boost::process::system (kill_cmd);
}
else {
......@@ -638,7 +638,7 @@ int main (int argc, char *argv[]) {
launcher_def top;
string gts;
launch_modes mode;
bool do_kill;
string kill_arg;
local_id.initialize();
top.set_options(opts);
......@@ -646,7 +646,7 @@ int main (int argc, char *argv[]) {
opts.add_options()
("timestamp,i",bpo::value<string>(),"set the timestamp for the first block. Use \"now\" to indicate the current time")
("launch,l",bpo::value<string>(), "select a subset of nodes to launch. Currently may be \"all\", \"none\", or \"local\". If not set, the default is to launch all unless an output file is named, in which case it starts none.")
("kill,k","The launcher retrieve the previously started process ids and issue a sigterm to each.")
("kill,k", bpo::value<string>(),"The launcher retrieves the previously started process ids and issue a kill signal to each.")
("help,h","print this list");
......@@ -657,7 +657,8 @@ int main (int argc, char *argv[]) {
if (vmap.count("timestamp"))
gts = vmap["timestamp"].as<string>();
do_kill = vmap.count("kill") > 0;
if (vmap.count("kill"))
kill_arg = vmap["kill"].as<string>();
if (vmap.count("help") > 0) {
opts.print(cerr);
return 0;
......@@ -679,11 +680,14 @@ int main (int argc, char *argv[]) {
}
}
else {
mode = do_kill || top.output.empty() ? LM_ALL : LM_NONE;
mode = !kill_arg.empty() || top.output.empty() ? LM_ALL : LM_NONE;
}
if (do_kill) {
top.kill (mode);
if (!kill_arg.empty()) {
if (kill_arg[0] != '-') {
kill_arg = "-" + kill_arg;
}
top.kill (mode, kill_arg);
}
else {
top.generate();
......
......@@ -32,10 +32,13 @@ Note that the Launcher will not push instances of eosd to the remote hosts, you
Network topology or "shape" describes how the nodes are connected in order to share transaction and block data, and requests for the same. The idea for varying network topology is that there is a trade off between the number of times a node must send a message reporting a new transaction or block, vs the number of times that message must be repeated to ensure all nodes know of it.
The Launcher has definitions of three different network "shapes" based on inter-nodal connections, which can be selected by a command line option, or you can supply your own network topology by editing the Launcher generated configuration file.
####Ring network
This is the simplest network, where each node identifies just the node next to it as it's only peer.
####Star network
A "star" is intended to support the use larger number nodes in the testnet. In this case the number of peers connected to a node and the distribution of those nodes varies based on the number of nodes in the network.
A "star" is intended to support the use larger number nodes in the testnet. In this case the number of peers connected to a node and the distribution of those nodes varies based on the number of nodes in the network.
####Mesh network
In a "mesh" network, each node is connected to as many peer nodes as possible.
......
#!/bin/bash
for a in tn_data_*; do kill `cat $a/eosd.pid`; done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册