mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
dev of mixins_time_scale method started
This commit is contained in:
parent
72279c5340
commit
f608ed3b81
3 changed files with 41 additions and 4 deletions
37
src/page.h
37
src/page.h
|
@ -543,6 +543,43 @@ namespace xmreg {
|
||||||
return txd;
|
return txd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string
|
||||||
|
mixins_time_scale(const vector<uint64_t>& timestamps)
|
||||||
|
{
|
||||||
|
string empty_time = string("___________________________________")
|
||||||
|
+ string("___________________________________")
|
||||||
|
+ string("___________________________________")
|
||||||
|
+ string("___________________________________");
|
||||||
|
|
||||||
|
size_t time_axis_length = empty_time.size();
|
||||||
|
|
||||||
|
cout << "time_axis_length: " << time_axis_length << endl;
|
||||||
|
|
||||||
|
uint64_t time0 = 10;
|
||||||
|
uint64_t timeN = 30;
|
||||||
|
|
||||||
|
uint64_t interval_length = timeN-time0;
|
||||||
|
|
||||||
|
double scale = double(interval_length) / double(time_axis_length);
|
||||||
|
|
||||||
|
for (const auto& timestamp: timestamps)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (timestamp < time0 || timestamp > timeN)
|
||||||
|
{
|
||||||
|
cout << "Out of range" << endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t timestamp_place = double(timestamp-time0)/double(interval_length)*(time_axis_length-1);
|
||||||
|
//cout << timestamp_place << endl;
|
||||||
|
empty_time[timestamp_place] = '*';
|
||||||
|
}
|
||||||
|
|
||||||
|
return string("Genesis ") + empty_time + string(" Now");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
pair<string, string>
|
pair<string, string>
|
||||||
get_age(uint64_t timestamp1, uint64_t timestamp2)
|
get_age(uint64_t timestamp1, uint64_t timestamp2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<table class="center" style="width:80%">
|
<table class="center" style="width:80%">
|
||||||
<tr>
|
<tr>
|
||||||
<td>hash</td>
|
<td>hash</td>
|
||||||
<td>inputs/outputs</td>
|
<td>outputs</td>
|
||||||
<td>fee</td>
|
<td>fee</td>
|
||||||
<td>mixin no</td>
|
<td>mixin no</td>
|
||||||
<td>size [kB]</td>
|
<td>size [kB]</td>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
{{#blk_txs}}
|
{{#blk_txs}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{hash}}</td>
|
<td>{{hash}}</td>
|
||||||
<td>{{sum_inputs}}/{{sum_outputs}}</td>
|
<td>{{sum_outputs}}</td>
|
||||||
<td>{{tx_fee}}</td>
|
<td>{{tx_fee}}</td>
|
||||||
<td>{{mixin}}</td>
|
<td>{{mixin}}</td>
|
||||||
<td>{{tx_size}}</td>
|
<td>{{tx_size}}</td>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<td>block hash</td>
|
<td>block hash</td>
|
||||||
<td>reward/fees</td>
|
<td>reward/fees</td>
|
||||||
<td>txs</td>
|
<td>txs</td>
|
||||||
<td>inputs/outputs</td>
|
<td>outputs</td>
|
||||||
<td>mixins</td>
|
<td>mixins</td>
|
||||||
<td>size [kB]</td>
|
<td>size [kB]</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<td><a href="/block/{{hash}}">{{hash}}</a></td>
|
<td><a href="/block/{{hash}}">{{hash}}</a></td>
|
||||||
<td>{{block_reward}}</td>
|
<td>{{block_reward}}</td>
|
||||||
<td>{{notx}}</td>
|
<td>{{notx}}</td>
|
||||||
<td>{{xmr_inputs}}/{{xmr_outputs}}</td>
|
<td>{{xmr_outputs}}</td>
|
||||||
<td>{{mixin_range}}</td>
|
<td>{{mixin_range}}</td>
|
||||||
<td>{{blksize}}</td>
|
<td>{{blksize}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue