mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
timestamp added to search_results
This commit is contained in:
parent
e98ee5170f
commit
261d12d2c5
3 changed files with 13 additions and 2 deletions
11
src/page.h
11
src/page.h
|
@ -1223,7 +1223,16 @@ namespace xmreg {
|
|||
|
||||
tx_details txd = get_tx_details(tx);
|
||||
|
||||
boost::get<mstch::array>((res.first)->second).push_back(txd.get_mstch_map());
|
||||
mstch::map txd_map = txd.get_mstch_map();
|
||||
|
||||
// get timestamp of the tx's block
|
||||
uint64_t blk_height = core_storage->get_db().get_tx_block_height(txd.hash);
|
||||
uint64_t blk_timestamp = core_storage->get_db().get_block_timestamp(blk_height);
|
||||
|
||||
// add the timestamp to tx mstch map
|
||||
txd_map.insert({"timestamp", xmreg::timestamp_to_str(blk_timestamp)});
|
||||
|
||||
boost::get<mstch::array>((res.first)->second).push_back(txd_map);
|
||||
|
||||
// dont show more than 500 results
|
||||
if (tx_i > 500)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<tr>
|
||||
<td>timestamp</td>
|
||||
<td>tx hash</td>
|
||||
<td>outputs</td>
|
||||
<td>fee</td>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<tr>
|
||||
<td>{{timestamp}}</td>
|
||||
<td><a href="/tx/{{hash}}">{{hash}}</a></td>
|
||||
<td>{{sum_outputs}}</td>
|
||||
<td>{{tx_fee}}</td>
|
||||
|
|
Loading…
Reference in a new issue