@@ -382,8 +382,8 @@ namespace graphene { namespace app {
382
382
FC_ASSERT (_app.chain_database ());
383
383
const auto & db = *_app.chain_database ();
384
384
database_api_helper db_api_helper ( _app );
385
- asset_id_type a = db_api_helper.get_asset_from_string ( asset_a )->id ;
386
- asset_id_type b = db_api_helper.get_asset_from_string ( asset_b )->id ;
385
+ asset_id_type a = db_api_helper.get_asset_from_string ( asset_a )->get_id () ;
386
+ asset_id_type b = db_api_helper.get_asset_from_string ( asset_b )->get_id () ;
387
387
if ( a > b ) std::swap (a,b);
388
388
const auto & history_idx = db.get_index_type <graphene::market_history::history_index>().indices ().get <by_key>();
389
389
history_key hkey;
@@ -426,7 +426,7 @@ namespace graphene { namespace app {
426
426
account_id_type account;
427
427
try {
428
428
database_api_helper db_api_helper ( _app );
429
- account = db_api_helper.get_account_from_string (account_id_or_name)->id ;
429
+ account = db_api_helper.get_account_from_string (account_id_or_name)->get_id () ;
430
430
} catch (...) { return result; }
431
431
432
432
if (_app.is_plugin_enabled (" elasticsearch" )) {
@@ -479,8 +479,8 @@ namespace graphene { namespace app {
479
479
account_id_type account;
480
480
try {
481
481
database_api_helper db_api_helper ( _app );
482
- account = db_api_helper.get_account_from_string (account_name_or_id)->id ;
483
- } catch (... ) { return result; }
482
+ account = db_api_helper.get_account_from_string (account_name_or_id)->get_id () ;
483
+ } catch ( const fc:: exception & ) { return result; }
484
484
485
485
fc::time_point_sec start = ostart.valid () ? *ostart : fc::time_point_sec::maximum ();
486
486
@@ -490,7 +490,7 @@ namespace graphene { namespace app {
490
490
return result;
491
491
492
492
const auto & acc_hist_idx = db.get_index_type <account_history_index>().indices ().get <by_op>();
493
- auto itr = acc_hist_idx.lower_bound ( boost::make_tuple ( account, op_hist_itr->id ) );
493
+ auto itr = acc_hist_idx.lower_bound ( boost::make_tuple ( account, op_hist_itr->get_id () ) );
494
494
auto itr_end = acc_hist_idx.upper_bound ( account );
495
495
496
496
while ( itr != itr_end && result.size () < limit )
@@ -521,7 +521,7 @@ namespace graphene { namespace app {
521
521
account_id_type account;
522
522
try {
523
523
database_api_helper db_api_helper ( _app );
524
- account = db_api_helper.get_account_from_string (account_id_or_name)->id ;
524
+ account = db_api_helper.get_account_from_string (account_id_or_name)->get_id () ;
525
525
} catch (...) { return result; }
526
526
const auto & stats = account (db).statistics (db);
527
527
if ( stats.most_recent_op == account_history_id_type () ) return result;
@@ -541,7 +541,7 @@ namespace graphene { namespace app {
541
541
else node = &node->next (db);
542
542
}
543
543
if ( stop.instance .value == 0 && result.size () < limit ) {
544
- auto head = db.find (account_history_id_type ());
544
+ const auto * head = db.find (account_history_id_type ());
545
545
if (head != nullptr && head->account == account && head->operation_id (db).op .which () == operation_type)
546
546
result.push_back (head->operation_id (db));
547
547
}
@@ -566,7 +566,7 @@ namespace graphene { namespace app {
566
566
account_id_type account;
567
567
try {
568
568
database_api_helper db_api_helper ( _app );
569
- account = db_api_helper.get_account_from_string (account_id_or_name)->id ;
569
+ account = db_api_helper.get_account_from_string (account_id_or_name)->get_id () ;
570
570
} catch (...) { return result; }
571
571
const auto & stats = account (db).statistics (db);
572
572
if ( start == 0 )
@@ -674,8 +674,8 @@ namespace graphene { namespace app {
674
674
675
675
const auto & db = *_app.chain_database ();
676
676
database_api_helper db_api_helper ( _app );
677
- asset_id_type a = db_api_helper.get_asset_from_string ( asset_a )->id ;
678
- asset_id_type b = db_api_helper.get_asset_from_string ( asset_b )->id ;
677
+ asset_id_type a = db_api_helper.get_asset_from_string ( asset_a )->get_id () ;
678
+ asset_id_type b = db_api_helper.get_asset_from_string ( asset_b )->get_id () ;
679
679
vector<bucket_object> result;
680
680
const auto configured_limit = _app.get_options ().api_limit_get_market_history ;
681
681
result.reserve ( configured_limit );
@@ -899,7 +899,7 @@ namespace graphene { namespace app {
899
899
(" configured_limit" , configured_limit) );
900
900
901
901
database_api_helper db_api_helper ( _app );
902
- asset_id_type asset_id = db_api_helper.get_asset_from_string ( asset_symbol_or_id )->id ;
902
+ asset_id_type asset_id = db_api_helper.get_asset_from_string ( asset_symbol_or_id )->get_id () ;
903
903
const auto & bal_idx = _db.get_index_type < account_balance_index >().indices ().get < by_asset_balance >();
904
904
auto range = bal_idx.equal_range ( boost::make_tuple ( asset_id ) );
905
905
@@ -933,7 +933,7 @@ namespace graphene { namespace app {
933
933
int64_t asset_api::get_asset_holders_count ( const std::string& asset_symbol_or_id ) const {
934
934
const auto & bal_idx = _db.get_index_type < account_balance_index >().indices ().get < by_asset_balance >();
935
935
database_api_helper db_api_helper ( _app );
936
- asset_id_type asset_id = db_api_helper.get_asset_from_string ( asset_symbol_or_id )->id ;
936
+ asset_id_type asset_id = db_api_helper.get_asset_from_string ( asset_symbol_or_id )->get_id () ;
937
937
auto range = bal_idx.equal_range ( boost::make_tuple ( asset_id ) );
938
938
939
939
int64_t count = boost::distance (range) - 1 ;
@@ -996,8 +996,8 @@ namespace graphene { namespace app {
996
996
vector< limit_order_group > result;
997
997
998
998
database_api_helper db_api_helper ( _app );
999
- asset_id_type base_asset_id = db_api_helper.get_asset_from_string ( base_asset )->id ;
1000
- asset_id_type quote_asset_id = db_api_helper.get_asset_from_string ( quote_asset )->id ;
999
+ asset_id_type base_asset_id = db_api_helper.get_asset_from_string ( base_asset )->get_id () ;
1000
+ asset_id_type quote_asset_id = db_api_helper.get_asset_from_string ( quote_asset )->get_id () ;
1001
1001
1002
1002
price max_price = price::max ( base_asset_id, quote_asset_id );
1003
1003
price min_price = price::min ( base_asset_id, quote_asset_id );
@@ -1037,7 +1037,7 @@ namespace graphene { namespace app {
1037
1037
if ( o_account_name_or_id.valid () )
1038
1038
{
1039
1039
const string& account_name_or_id = *o_account_name_or_id;
1040
- const account_id_type account_id = db_api_helper.get_account_from_string (account_name_or_id)->id ;
1040
+ const account_id_type account_id = db_api_helper.get_account_from_string (account_name_or_id)->get_id () ;
1041
1041
if ( catalog.valid () )
1042
1042
{
1043
1043
if ( key.valid () )
0 commit comments