diff --git a/libraries/chain/db_maint.cpp b/libraries/chain/db_maint.cpp index 6646d2e1..fb768d74 100644 --- a/libraries/chain/db_maint.cpp +++ b/libraries/chain/db_maint.cpp @@ -393,10 +393,12 @@ void database::update_active_sons() } } - const chain_property_object& cpo = get_chain_properties(); - auto sons = sort_votable_objects(std::max(son_count*2+1, (size_t)cpo.immutable_parameters.min_son_count)); + //const chain_property_object& cpo = get_chain_properties(); + //auto sons = sort_votable_objects(std::max(son_count*2+1, (size_t)cpo.immutable_parameters.min_son_count)); const global_property_object& gpo = get_global_properties(); + const chain_parameters& cp = gpo.parameters; + auto sons = sort_votable_objects(cp.maximum_son_count); const auto& all_sons = get_index_type().indices(); diff --git a/libraries/chain/include/graphene/chain/global_property_object.hpp b/libraries/chain/include/graphene/chain/global_property_object.hpp index cb93fcf1..ea0925d2 100644 --- a/libraries/chain/include/graphene/chain/global_property_object.hpp +++ b/libraries/chain/include/graphene/chain/global_property_object.hpp @@ -51,9 +51,7 @@ namespace graphene { namespace chain { uint32_t next_available_vote_id = 0; vector active_committee_members; // updated once per maintenance interval flat_set active_witnesses; // updated once per maintenance interval - // n.b. witness scheduling is done by witness_schedule object - - flat_set active_sons; // updated once per maintenance interval + vector active_sons; // updated once per maintenance interval }; /** diff --git a/tests/cli/main.cpp b/tests/cli/main.cpp index f01afd9e..2f64f481 100644 --- a/tests/cli/main.cpp +++ b/tests/cli/main.cpp @@ -1361,9 +1361,7 @@ BOOST_FIXTURE_TEST_CASE( select_top_fifteen_sons, cli_fixture ) BOOST_TEST_MESSAGE("gpo: " << gpo.active_sons.size()); BOOST_CHECK(generate_maintenance_block(app1)); - BOOST_CHECK(gpo.active_sons.size() == 16); BOOST_CHECK(gpo.active_sons.size() == 15); - BOOST_CHECK(gpo.active_sons.size() == 0); } catch( fc::exception& e ) { BOOST_TEST_MESSAGE("SON cli wallet tests exception");