return force settlement order with the get_full_account api

This commit is contained in:
alt 2017-04-15 12:24:51 +10:00
parent 8a44c6a2e6
commit a3fe0e128c
2 changed files with 9 additions and 2 deletions

View file

@ -666,6 +666,11 @@ std::map<std::string, full_account> database_api_impl::get_full_accounts( const
[&acnt] (const call_order_object& call) { [&acnt] (const call_order_object& call) {
acnt.call_orders.emplace_back(call); acnt.call_orders.emplace_back(call);
}); });
auto settle_range = _db.get_index_type<force_settlement_index>().indices().get<by_account>().equal_range(account->id);
std::for_each(settle_range.first, settle_range.second,
[&acnt] (const force_settlement_object& settle) {
acnt.settle_orders.emplace_back(settle);
});
// get assets issued by user // get assets issued by user
auto asset_range = _db.get_index_type<asset_index>().indices().get<by_issuer>().equal_range(account->id); auto asset_range = _db.get_index_type<asset_index>().indices().get<by_issuer>().equal_range(account->id);

View file

@ -44,6 +44,7 @@ namespace graphene { namespace app {
vector<vesting_balance_object> vesting_balances; vector<vesting_balance_object> vesting_balances;
vector<limit_order_object> limit_orders; vector<limit_order_object> limit_orders;
vector<call_order_object> call_orders; vector<call_order_object> call_orders;
vector<force_settlement_object> settle_orders;
vector<proposal_object> proposals; vector<proposal_object> proposals;
vector<asset_id_type> assets; vector<asset_id_type> assets;
vector<withdraw_permission_object> withdraws; vector<withdraw_permission_object> withdraws;
@ -51,7 +52,7 @@ namespace graphene { namespace app {
} } } }
FC_REFLECT( graphene::app::full_account, FC_REFLECT( graphene::app::full_account,
(account) (account)
(statistics) (statistics)
(registrar_name) (registrar_name)
@ -63,7 +64,8 @@ FC_REFLECT( graphene::app::full_account,
(vesting_balances) (vesting_balances)
(limit_orders) (limit_orders)
(call_orders) (call_orders)
(proposals) (settle_orders)
(proposals)
(assets) (assets)
(withdraws) (withdraws)
) )