fix bug with SON activation

This commit is contained in:
gladcow 2020-01-12 16:09:30 +03:00
parent d440fa98b9
commit 9d8278428f
2 changed files with 13 additions and 1 deletions

View file

@ -471,6 +471,18 @@ void database::update_active_sons()
} else {
ilog( "Active SONs set CHANGED" );
// Store new SON info, initiate wallet recreation and transfer of funds
for( const son_object& son : cur_active_sons )
{
modify( son, [&]( son_object& obj ){
obj.status = son_status::inactive;
});
}
for( const son_object& son : new_active_sons )
{
modify( son, [&]( son_object& obj ){
obj.status = son_status::active;
});
}
}
modify(gpo, [&]( global_property_object& gp ){

View file

@ -97,7 +97,7 @@ namespace graphene { namespace chain {
FC_REFLECT_ENUM(graphene::chain::son_status, (inactive)(active)(in_maintenance)(deregistered) )
FC_REFLECT_DERIVED( graphene::chain::son_object, (graphene::db::object),
(son_account)(vote_id)(total_votes)(url)(deposit)(signing_key)(pay_vb)(sidechain_public_keys) )
(son_account)(vote_id)(total_votes)(url)(deposit)(signing_key)(pay_vb)(status)(sidechain_public_keys) )
FC_REFLECT_DERIVED( graphene::chain::son_statistics_object,
(graphene::db::object),