Skip to content

Commit

Permalink
Merge pull request #2644 from bitshares/pr-2643-cli-acc-hist-time
Browse files Browse the repository at this point in the history
Improve performance of account history wallet APIs by using the block_time field in operation_history_object
  • Loading branch information
abitmore committed Jun 19, 2023
2 parents 3f5c6c4 + ed08a9b commit f024d42
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libraries/wallet/wallet_results.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ namespace graphene { namespace wallet { namespace detail {
for( operation_detail& d : r )
{
operation_history_object& i = d.op;
auto b = _remote_db->get_block_header(i.block_num);
FC_ASSERT(b);
ss << i.block_num << " ";
ss << b->timestamp.to_iso_string() << " ";
ss << i.block_time.to_iso_string() << " ";
ss << string(i.id) << " ";
i.op.visit(operation_printer(ss, *this, i));
ss << " \n";
Expand All @@ -72,10 +70,8 @@ namespace graphene { namespace wallet { namespace detail {
ss << "result_count : " << r.result_count << " \n";
for (operation_detail_ex& d : r.details) {
operation_history_object& i = d.op;
auto b = _remote_db->get_block_header(i.block_num);
FC_ASSERT(b);
ss << i.block_num << " ";
ss << b->timestamp.to_iso_string() << " ";
ss << i.block_time.to_iso_string() << " ";
ss << string(i.id) << " ";
i.op.visit(operation_printer(ss, *this, i));
ss << " transaction_id : ";
Expand Down

0 comments on commit f024d42

Please sign in to comment.