Add workarounds for devnet batching testing

This commit is contained in:
Jason Rhinelander 2021-06-08 21:51:39 -03:00
parent 22e5805abc
commit 9155a22b9c
2 changed files with 29 additions and 12 deletions

View File

@ -68,7 +68,7 @@ Note that this value does not include earned transaction fees ({{sum_fees | oxen
</span>
{%endif%}
{%if miner_tx.extra.sn_winner%}
{%if miner_tx and miner_tx.extra.sn_winner%}
<span><label>Service Node Winner:</label>
{%if miner_tx.extra.sn_winner == "0000000000000000000000000000000000000000000000000000000000000000"%}
None
@ -79,6 +79,7 @@ Note that this value does not include earned transaction fees ({{sum_fees | oxen
{%endif%}
</h4>
{%if miner_tx%}
<h2>Miner Reward Transaction</h2>
<div class="TitleUnderliner"></div>
<table class="Table">
@ -95,6 +96,7 @@ Note that this value does not include earned transaction fees ({{sum_fees | oxen
<td>{{miner_tx.info.version}}</td>
</tr>
</table>
{%endif%}
<h2>Transactions ({{transactions | length}})</h2>

View File

@ -165,17 +165,32 @@
{% import 'include/tx_type_symbol.html' as symbol %}
{% import 'include/tx_fee.html' as fee %}
{% for b in blocks | reverse %}
<tr class="block">
<td><a href="/block/{{b.height}}">{{b.height}}</a></td>
<td title="{{b.timestamp | from_timestamp | format_datetime}}">{{b.timestamp | from_timestamp | ago}}</td>
<td>{{b.block_size | si}}</td>
<td>{{symbol.display(b.txs[0])}}</td>
<td><a href="/tx/{{b.miner_tx_hash}}">{{b.miner_tx_hash}}</a></td>
<td>{{fee.display(b.txs[0])}}</td>
<td>{{b.reward | oxen(tag=False, fixed=True, decimals=2)}}</td>
<td>0/{{b.txs[0].info.vout | length}}</td>
<td>{{b.txs[0].size | si}}</td>
</tr>
{% if b.txs | length > 0 %}
<tr class="block">
<td><a href="/block/{{b.height}}">{{b.height}}</a></td>
<td title="{{b.timestamp | from_timestamp | format_datetime}}">{{b.timestamp | from_timestamp | ago}}</td>
<td>{{b.block_size | si}}</td>
<td>{{symbol.display(b.txs[0])}}</td>
<td><a href="/tx/{{b.miner_tx_hash}}">{{b.miner_tx_hash}}</a></td>
<td>{{fee.display(b.txs[0])}}</td>
<td>{{b.reward | oxen(tag=False, fixed=True, decimals=2)}}</td>
<td>0/{{b.txs[0].info.vout | length}}</td>
<td>{{b.txs[0].size | si}}</td>
</tr>
{% else %}
{# no miner tx, e.g. from batching #}
<tr class="block">
<td><a href="/block/{{b.height}}">{{b.height}}</a></td>
<td title="{{b.timestamp | from_timestamp | format_datetime}}">{{b.timestamp | from_timestamp | ago}}</td>
<td>{{b.block_size | si}}</td>
<td></td>
<td><a href="/tx/{{b.miner_tx_hash}}">{{b.miner_tx_hash}}</a></td>
<td></td>
<td>{{b.reward | oxen(tag=False, fixed=True, decimals=2)}}</td>
<td></td>
<td></td>
</tr>
{%endif%}
{% for tx in b.txs[1:] %}
<tr class="tx">
<td></td>