|
|
@ -81,7 +81,7 @@ namespace xmreg {
|
|
|
|
{"height" , fmt::format("{:d}", height)},
|
|
|
|
{"height" , fmt::format("{:d}", height)},
|
|
|
|
{"server_timestamp", xmreg::timestamp_to_str(server_timestamp)},
|
|
|
|
{"server_timestamp", xmreg::timestamp_to_str(server_timestamp)},
|
|
|
|
{"blocks" , mstch::array()},
|
|
|
|
{"blocks" , mstch::array()},
|
|
|
|
{"age_format" , "[h:m:d]"},
|
|
|
|
{"age_format" , string("[h:m:d]")},
|
|
|
|
{"page_no" , fmt::format("{:d}", page_no)},
|
|
|
|
{"page_no" , fmt::format("{:d}", page_no)},
|
|
|
|
{"total_page_no" , fmt::format("{:d}", height / (no_of_last_blocks))},
|
|
|
|
{"total_page_no" , fmt::format("{:d}", height / (no_of_last_blocks))},
|
|
|
|
{"is_page_zero" , bool(page_no)},
|
|
|
|
{"is_page_zero" , bool(page_no)},
|
|
|
@ -100,6 +100,8 @@ namespace xmreg {
|
|
|
|
start_height = start_height > 0 ? start_height : 0;
|
|
|
|
start_height = start_height > 0 ? start_height : 0;
|
|
|
|
end_height = end_height < height ? end_height : height;
|
|
|
|
end_height = end_height < height ? end_height : height;
|
|
|
|
start_height = start_height > end_height ? 0 : start_height;
|
|
|
|
start_height = start_height > end_height ? 0 : start_height;
|
|
|
|
|
|
|
|
end_height = end_height - start_height > no_of_last_blocks
|
|
|
|
|
|
|
|
? no_of_last_blocks : end_height;
|
|
|
|
|
|
|
|
|
|
|
|
cout << start_height << ", " << end_height << endl;
|
|
|
|
cout << start_height << ", " << end_height << endl;
|
|
|
|
|
|
|
|
|
|
|
@ -134,14 +136,14 @@ namespace xmreg {
|
|
|
|
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}:{:02d}",
|
|
|
|
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}:{:02d}",
|
|
|
|
delta_time[0], delta_time[1], delta_time[2],
|
|
|
|
delta_time[0], delta_time[1], delta_time[2],
|
|
|
|
delta_time[3], delta_time[4]);
|
|
|
|
delta_time[3], delta_time[4]);
|
|
|
|
context["age_format"] = "[y:d:h:m:s]";
|
|
|
|
context["age_format"] = string("[y:d:h:m:s]");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (delta_time[1] > 0)
|
|
|
|
else if (delta_time[1] > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}",
|
|
|
|
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}",
|
|
|
|
delta_time[1], delta_time[2],
|
|
|
|
delta_time[1], delta_time[2],
|
|
|
|
delta_time[3], delta_time[4]);
|
|
|
|
delta_time[3], delta_time[4]);
|
|
|
|
context["age_format"] = "[d:h:m:s]";
|
|
|
|
context["age_format"] = string("[d:h:m:s]");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// get xmr in the block reward
|
|
|
|
// get xmr in the block reward
|
|
|
|