Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

fixes for multi-node testing with the test.system contract #1488

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me we should make peer-private-key required so that private_keys is never empty. I think you are fine to remove this code for now.

return chain::public_key_type();
}

Expand Down