42 lines
2.4 KiB
Plaintext
42 lines
2.4 KiB
Plaintext
{% import "git.gammaspectra.live/P2Pool/p2pool-observer/index" %}
|
|
|
|
{% func TemplateSweeps(ctx *GlobalRequestContext, sweeps []*index.MainLikelySweepTransaction, isMiner bool) %}
|
|
{% if isMiner %}
|
|
<table class="center datatable" style="max-width: calc(12em + 10em + 10em + 8em + 10em + 10em + 10em + 12em)">
|
|
{% else %}
|
|
<table class="center datatable" style="max-width: calc(12em + 10em + 12em + 8em + 10em + 10em + 10em + 10em + 12em)">
|
|
{% endif %}
|
|
<tr>
|
|
<th style="width: 12em;">Transaction Id</th>
|
|
<th style="width: 8em;">Age <small>[h:m:s]</small></th>
|
|
{% if !isMiner %}
|
|
<th style="width: 12em;" title="The P2Pool miner who likely produced this sweep">Owned by</th>
|
|
{% endif %}
|
|
<th style="width: 8em;" title="The number of decoys each input has">Decoys per Input</th>
|
|
<th style="width: 10em;" title="The number of inputs and outputs in this transaction">Inputs / Outputs</th>
|
|
<th style="width: 10em;" title="The number and ratio of decoy inputs owned by the miner on this sweep">Self Decoys</th>
|
|
<th style="width: 10em;" title="The number and ratio of decoy inputs owned by other miners on this sweep">Other Decoys</th>
|
|
<th style="width: 10em;" title="The number and ratio of decoy inputs not owned by miners on this sweep">Unknown Decoys</th>
|
|
<th style="width: 10em;" title="The value known from Coinbase sources">Swept Coinbase Value</th>
|
|
</tr>
|
|
{% for _, s := range sweeps %}
|
|
<tr>
|
|
<td class="mono small"><a href="/transaction-lookup?txid={%= hex(s.Id) %}">{%= shorten(s.Id, 10) %}</a></td>
|
|
<td title="{%s utc_date(s.Timestamp) %}">{%s date_diff_short(s.Timestamp) %}</td>
|
|
{% if !isMiner %}
|
|
<td title="{%s s.Address.ToBase58() %}" class="mono small"><a href="/miner/{%s s.Address.ToBase58() %}">{%= shorten(s.Address.ToBase58(), 10) %}</a></td>
|
|
{% endif %}
|
|
<td>{%d s.InputDecoyCount %}</td>
|
|
<td>{%d s.InputCount %} / {%d len(s.GlobalOutputIndices) %}</td>
|
|
<td>{%d s.MinerCount %} ({%f.2 float64(s.MinerRatio)*100 %}%)</td>
|
|
<td>{%d s.OtherMinersCount %} ({%f.2 float64(s.OtherMinersRatio)*100 %}%)</td>
|
|
<td>{%d s.NoMinerCount %} ({%f.2 float64(s.NoMinerRatio)*100 %}%)</td>
|
|
{% if s.Value == 0 %}
|
|
<td>-</td>
|
|
{% else %}
|
|
<td class="mono">{%s monero_to_xmr(s.Value) %} XMR</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endfunc %} |