Fix get_full_accounts and SON object serialization

This commit is contained in:
serkixenos 2021-01-25 13:26:17 +01:00
parent e747df35df
commit a1f13a964c
4 changed files with 18 additions and 3 deletions

View file

@ -2086,7 +2086,7 @@ vector<variant> database_api_impl::lookup_vote_ids( const vector<vote_id_type>&
{
auto itr = son_idx.find( id );
if( itr != son_idx.end() )
result.emplace_back( variant( *itr, 1 ) );
result.emplace_back( variant( *itr, 5 ) );
else
result.emplace_back( variant() );
break;

View file

@ -70,6 +70,5 @@ FC_REFLECT( graphene::app::full_account,
(proposals)
(assets)
(withdraws)
(proposals)
(pending_dividend_payments)
)

View file

@ -115,7 +115,17 @@ namespace graphene { namespace chain {
FC_REFLECT_ENUM(graphene::chain::son_status, (inactive)(active)(request_maintenance)(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)(statistics)(status)(sidechain_public_keys) )
(son_account)
(vote_id)
(total_votes)
(url)
(deposit)
(signing_key)
(pay_vb)
(statistics)
(status)
(sidechain_public_keys)
)
FC_REFLECT_DERIVED( graphene::chain::son_statistics_object,
(graphene::db::object),
@ -131,3 +141,6 @@ FC_REFLECT_DERIVED( graphene::chain::son_statistics_object,
(total_sidechain_txs_reported)
(sidechain_txs_reported)
)
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::son_object )
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::son_statistics_object )

View file

@ -35,6 +35,7 @@
#include <graphene/chain/global_property_object.hpp>
#include <graphene/chain/market_object.hpp>
#include <graphene/chain/operation_history_object.hpp>
#include <graphene/chain/son_object.hpp>
#include <graphene/chain/special_authority_object.hpp>
#include <graphene/chain/transaction_object.hpp>
#include <graphene/chain/withdraw_permission_object.hpp>
@ -62,6 +63,8 @@ GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::dynamic_global
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::global_property_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::operation_history_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_transaction_history_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::son_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::son_statistics_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::special_authority_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::transaction_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_object )