show no of txpool if not zero only

master
moneroexamples 8 years ago
parent 6e169cb848
commit 8fb6dfef06

@ -827,14 +827,15 @@ namespace xmreg
} }
context["network_info"] = mstch::map { context["network_info"] = mstch::map {
{"difficulty" , current_network_info.difficulty}, {"difficulty" , current_network_info.difficulty},
{"hash_rate" , hash_rate}, {"hash_rate" , hash_rate},
{"fee_per_kb" , print_money(current_network_info.fee_per_kb)}, {"fee_per_kb" , print_money(current_network_info.fee_per_kb)},
{"alt_blocks_no" , current_network_info.alt_blocks_no}, {"alt_blocks_no" , current_network_info.alt_blocks_no},
{"tx_pool_size" , current_network_info.tx_pool_size}, {"tx_pool_size" , current_network_info.tx_pool_size},
{"is_current_info" , is_network_info_current}, {"is_current_info" , is_network_info_current},
{"age" , network_info_age.first}, {"is_pool_size_zero" , (current_network_info.tx_pool_size == 0)},
{"age_format" , network_info_age.second}, {"age" , network_info_age.first},
{"age_format" , network_info_age.second},
}; };
string mempool_html {"Cant get mempool_pool"}; string mempool_html {"Cant get mempool_pool"};

@ -6,9 +6,9 @@
<p>Mempool data preparation for the front page failed. <p>Mempool data preparation for the front page failed.
Its processing Its processing
{{#network_info}}{{#tx_pool_size}}({{tx_pool_size}} txs){{/tx_pool_size}}{{/network_info}} {{#network_info}}{{^is_pool_size_zero}}({{tx_pool_size}} txs){{/is_pool_size_zero}}{{/network_info}}
took longer than expected and it timed out. took longer than expected and it timed out.
To view mempool without time constrain, To view the mempool without time constrain,
go to dedicated mempool page: <a href="/mempool">memory pool</a> go to dedicated mempool page: <a href="/mempool">memory pool</a>
</p> </p>

Loading…
Cancel
Save