mirror of
https://github.com/oxen-io/oxen-observer.git
synced 2023-12-14 09:22:54 +01:00
Add tx symbol & add missing fee to mempool tx list
This commit is contained in:
parent
d89177204f
commit
2c394386e3
|
@ -155,7 +155,7 @@ def main(refresh=None, page=0, per_page=None, first=None, last=None):
|
|||
stake = FutureJSON(lmq, lokid, 'rpc.get_staking_requirement', 10)
|
||||
base_fee = FutureJSON(lmq, lokid, 'rpc.get_fee_estimate', 10)
|
||||
hfinfo = FutureJSON(lmq, lokid, 'rpc.hard_fork_info', 10)
|
||||
mempool = FutureJSON(lmq, lokid, 'rpc.get_transaction_pool', 5)
|
||||
mempool = FutureJSON(lmq, lokid, 'rpc.get_transaction_pool', 5, args=[json.dumps({"tx_extra":True}).encode()])
|
||||
sns = get_sns_future(lmq, lokid)
|
||||
|
||||
# This call is slow the first time it gets called in lokid but will be fast after that, so call
|
||||
|
|
|
@ -21,11 +21,15 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% import 'include/tx_type_symbol.html' as symbol %}
|
||||
{% import 'include/tx_fee.html' as fee %}
|
||||
{% for tx in mempool.transactions[:mempool_limit] %}
|
||||
<tr>
|
||||
<td title="{{tx.receive_time | from_timestamp | format_datetime}}">{{tx.receive_time | from_timestamp | ago}}</td>
|
||||
<td class=TXType>{{tx_type_symbol}}</td>
|
||||
<td>{{symbol.display(tx)}}</td>
|
||||
<td><a href="/tx/{{tx.id_hash}}">{{tx.id_hash}}</a></td>
|
||||
<td>{{fee.display(tx)}} /
|
||||
{{(tx.info.rct_signatures.txnFee * 1000 / tx.blob_size) | loki(tag=false, decimals=4)}}</td>
|
||||
<td>{{tx.info.vin | length}}/{{tx.info.vout | length}}</td>
|
||||
<td>{{tx.blob_size | si}}B</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{% macro display(tx, show_zero=false) -%}
|
||||
{% set fee =
|
||||
(tx.info.rct_signatures.txnFee if 'rct_signatures' in tx.info and 'txnFee' in tx.info.rct_signatures else 0) +
|
||||
(tx.extra.burn_amount if 'burn_amount' in tx.info else 0)
|
||||
(tx.info.rct_signatures.txnFee if 'rct_signatures' in tx.info and 'txnFee' in tx.info.rct_signatures else 0)
|
||||
-%}
|
||||
{% if fee > 0 or show_zero -%}
|
||||
{{ fee | loki(tag=False, fixed=True, decimals=4) }}
|
||||
|
|
Loading…
Reference in a new issue