Skip to content

Commit

Permalink
header tests in 1 block
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Feb 20, 2018
1 parent e00f261 commit 753b899
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,14 @@ namespace graphene { namespace app {
const auto& db = *_app.chain_database();
FC_ASSERT( limit <= 100 );
vector<operation_history_object> result;
account_statistics_object stats;
try { stats = account(db).statistics(db); } catch(...) { return result; }
const account_transaction_history_object* node;
try { node = &stats.most_recent_op(db); } catch(...) { return result; }
if( start == operation_history_id_type() )
start = node->operation_id;
if( start.instance.value > node->operation_id.instance.value )
start = node->operation_id;
try {
optional<account_statistics_object> stats;
optional<account_transaction_history_object> node;
stats = account(db).statistics(db);
node = stats->most_recent_op(db);
if(start == operation_history_id_type() || start.instance.value > node->operation_id.instance.value)
start = node->operation_id;
} catch(...) { return result; }

const auto& hist_idx = db.get_index_type<account_transaction_history_index>();
const auto& by_op_idx = hist_idx.indices().get<by_op>();
Expand Down

0 comments on commit 753b899

Please sign in to comment.