diff --git a/plugins/txn_test_gen_plugin/txn_test_gen_plugin.cpp b/plugins/txn_test_gen_plugin/txn_test_gen_plugin.cpp index 1bc02dd246e..8c3ae4e2b62 100644 --- a/plugins/txn_test_gen_plugin/txn_test_gen_plugin.cpp +++ b/plugins/txn_test_gen_plugin/txn_test_gen_plugin.cpp @@ -153,13 +153,21 @@ struct txn_test_gen_plugin_impl { { signed_transaction trx; abi_serializer currency_serializer(currency_abi_def); - + + { + action act; + act.account = N(currency); + act.name = N(create); + act.authorization = vector{{newaccountC,config::active_name}}; + act.data = currency_serializer.variant_to_binary("create", fc::json::from_string("{\"issuer\":\"currency\",\"maximum_supply\":\"1000000000.0000 CUR\", \"can_freeze\":0, \"can_recall\":0, \"can_whitelist\":0}}")); + trx.actions.push_back(act); + } { action act; act.account = N(currency); act.name = N(issue); act.authorization = vector{{newaccountC,config::active_name}}; - act.data = currency_serializer.variant_to_binary("issue", fc::json::from_string("{\"to\":\"currency\",\"quantity\":\"600.0000 CUR\"}")); + act.data = currency_serializer.variant_to_binary("issue", fc::json::from_string("{\"to\":\"currency\",\"quantity\":\"600.0000 CUR\",\"memo\":\"\"}")); trx.actions.push_back(act); } { @@ -243,13 +251,13 @@ struct txn_test_gen_plugin_impl { fc::crypto::private_key a_priv_key = fc::crypto::private_key::regenerate(fc::sha256(std::string(64, 'a'))); fc::crypto::private_key b_priv_key = fc::crypto::private_key::regenerate(fc::sha256(std::string(64, 'b'))); - static uint64_t nonce; + static uint64_t nonce = 0; for(unsigned int i = 0; i < batch; ++i) { { signed_transaction trx; trx.actions.push_back(act_a_to_b); - trx.actions.emplace_back(action({}, config::system_account_name, "nonce", fc::raw::pack(nonce))); + trx.context_free_actions.emplace_back(action({}, config::system_account_name, "nonce", fc::raw::pack(nonce++))); trx.set_reference_block(cc.head_block_id()); trx.expiration = cc.head_block_time() + fc::seconds(30); trx.sign(a_priv_key, chainid); @@ -259,7 +267,7 @@ struct txn_test_gen_plugin_impl { { signed_transaction trx; trx.actions.push_back(act_b_to_a); - trx.actions.emplace_back(action({}, config::system_account_name, "nonce", fc::raw::pack(nonce))); + trx.context_free_actions.emplace_back(action({}, config::system_account_name, "nonce", fc::raw::pack(nonce++))); trx.set_reference_block(cc.head_block_id()); trx.expiration = cc.head_block_time() + fc::seconds(30); trx.sign(b_priv_key, chainid); diff --git a/programs/nodeos/main.cpp b/programs/nodeos/main.cpp index 116ddec8b0a..8d534753481 100644 --- a/programs/nodeos/main.cpp +++ b/programs/nodeos/main.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -104,7 +105,7 @@ int main(int argc, char** argv) bfs::path root = determine_root_directory(); app().set_default_data_dir(root / "var/lib/eosio/node_00"); app().set_default_config_dir(root / "etc/eosio/node_00"); - if(!app().initialize(argc, argv)) + if(!app().initialize(argc, argv)) return -1; initialize_logging(); ilog("nodeos version ${ver}", ("ver", eosio::nodeos::config::itoh(static_cast(app().version()))));