DataHoarder
55661a12da
All checks were successful
continuous-integration/drone/push Build is passing
51 lines
2.6 KiB
Plaintext
51 lines
2.6 KiB
Plaintext
{% import "git.gammaspectra.live/P2Pool/p2pool-observer/cmd/index" %}
|
|
|
|
{% func TemplateSweeps(ctx *GlobalRequestContext, sweeps <-chan *index.MainLikelySweepTransaction, isMiner bool) %}
|
|
<div class="table-responsive">
|
|
{% if isMiner %}
|
|
<table class="table table-striped table-hover table-borderless table-sm datatable" style="max-width: calc(12em + 10em + 10em + 8em + 10em + 10em + 10em + 12em)">
|
|
{% else %}
|
|
<table class="table table-striped table-hover table-borderless table-sm datatable" style="max-width: calc(12em + 10em + 12em + 8em + 10em + 10em + 10em + 10em + 12em)">
|
|
{% endif %}
|
|
<thead>
|
|
<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>
|
|
</thead>
|
|
<tbody>
|
|
{% for s := range sweeps %}
|
|
<tr>
|
|
<td class="mono small"><a href="/transaction-lookup?txid={%= hex(ctx, s.Id) %}">{%= shorten(ctx, s.Id, 10) %}</a></td>
|
|
<td title="{%s utc_date(s.Timestamp) %}">{%s date_diff_short(s.Timestamp) %}</td>
|
|
{% if !isMiner %}
|
|
{% code
|
|
addr := s.Address.ToBase58()
|
|
%}
|
|
<td title="{%z= addr %}" class="mono small"><a href="/miner/{%z= addr %}">{%= shorten(ctx, addr, 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 %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endfunc %} |