Skip to content

Commit

Permalink
Merge pull request EOSIO#1488 from wanderingbort/feature/fixes-for-mu…
Browse files Browse the repository at this point in the history
…ltinode-testing

fixes for multi-node testing with the test.system contract
  • Loading branch information
b1bart authored Feb 27, 2018
2 parents 49ac3da + a123272 commit 6ce958f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions contracts/test.system/test.system.abi
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"name": "producer_key",
"base": "",
"fields": [
{"name":"account", "type":"account_name"},
{"name":"public_key", "type":"string"}
{"name":"producer_name", "type":"account_name"},
{"name":"signing_key", "type":"public_key"}
]
},{
"name": "set_producers",
"base": "",
"fields": [
{"name":"version", "type":"uint32"},
{"name":"producer", "type":"producer_key[]"}
{"name":"producers", "type":"producer_key[]"}
]
},{
"name": "require_auth",
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/chain_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ account_name chain_controller::get_scheduled_producer(uint32_t slot_num)const
uint64_t current_aslot = dpo.current_absolute_slot + slot_num;
const auto& gpo = _db.get<global_property_object>();
auto number_of_active_producers = gpo.active_producers.producers.size();
auto index = current_aslot % (number_of_active_producers);
auto index = current_aslot % (number_of_active_producers * config::producer_repititions);
index /= config::producer_repititions;
FC_ASSERT( gpo.active_producers.producers.size() > 0, "no producers defined" );

Expand Down
4 changes: 2 additions & 2 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2478,9 +2478,9 @@ namespace eosio {
chain::public_key_type net_plugin_impl::get_authentication_key() const {
if(!private_keys.empty())
return private_keys.begin()->first;
producer_plugin* pp = app().find_plugin<producer_plugin>();
/*producer_plugin* pp = app().find_plugin<producer_plugin>();
if(pp != nullptr && pp->get_state() == abstract_plugin::started)
return pp->first_producer_public_key();
return pp->first_producer_public_key();*/
return chain::public_key_type();
}

Expand Down

0 comments on commit 6ce958f

Please sign in to comment.