diff --git a/libraries/app/api.cpp b/libraries/app/api.cpp index 5924f39051..786c7a9f31 100644 --- a/libraries/app/api.cpp +++ b/libraries/app/api.cpp @@ -303,12 +303,9 @@ namespace graphene { namespace app { FC_ASSERT( limit <= 100 ); vector result; try { - optional stats; - optional 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; + const account_transaction_history_object& node = account(db).statistics(db).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();