Skip to content

Commit

Permalink
Changed creator account from inita to user argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Pravin committed Dec 15, 2017
1 parent e5dfe2f commit d9779fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions programs/eosc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -955,14 +955,16 @@ int main( int argc, char** argv ) {
auto benchmark_setup = benchmark->add_subcommand( "setup", localized("Configures initial condition for benchmark") );
uint64_t number_of_accounts = 2;
benchmark_setup->add_option("accounts", number_of_accounts, localized("the number of accounts in transfer among"))->required();
string c_account;
benchmark_setup->add_option("creator", c_account, localized("The creator account for benchmark accounts"))->required();
string owner_key;
string active_key;
benchmark_setup->add_option("owner", owner_key, localized("The owner key to use for account creation"))->required();
benchmark_setup->add_option("active", active_key, localized("The active key to use for account creation"))->required();
add_standard_transaction_options(benchmark_setup);

benchmark_setup->set_callback([&]{
auto controlling_account_arg = fc::mutable_variant_object( "controlling_account", string("inita"));
auto controlling_account_arg = fc::mutable_variant_object( "controlling_account", c_account);
auto response_servants = call(get_controlled_accounts_func, controlling_account_arg);
fc::variant_object response_var;
fc::from_variant(response_servants, response_var);
Expand All @@ -989,7 +991,7 @@ int main( int argc, char** argv ) {
for( uint32_t i = num_existing_accounts; i < num_existing_accounts + number_of_accounts; ++i ) {
name newaccount( name("benchmark").value + i );
public_key_type owner(owner_key), active(active_key);
name creator("inita" );
name creator(c_account);

auto owner_auth = eosio::chain::authority{1, {{owner, 1}}, {}};
auto active_auth = eosio::chain::authority{1, {{active, 1}}, {}};
Expand Down

0 comments on commit d9779fe

Please sign in to comment.