mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
dont allow mempool_refresh_time to be zero
This commit is contained in:
parent
8541f38ef1
commit
1495626e4a
1 changed files with 6 additions and 2 deletions
|
@ -31,7 +31,11 @@ MempoolStatus::start_mempool_status_thread()
|
||||||
local_copy.info_timestamp = 0;
|
local_copy.info_timestamp = 0;
|
||||||
current_network_info = local_copy;
|
current_network_info = local_copy;
|
||||||
|
|
||||||
|
if (mempool_refresh_time < 1)
|
||||||
|
{
|
||||||
|
// to protect from diviation by zero below.
|
||||||
|
mempool_refresh_time = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_running)
|
if (!is_running)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +54,7 @@ MempoolStatus::start_mempool_status_thread()
|
||||||
|
|
||||||
// we just query network status every minute. No sense
|
// we just query network status every minute. No sense
|
||||||
// to do it as frequently as getting mempool data.
|
// to do it as frequently as getting mempool data.
|
||||||
if (loop_index % 4 == 0)
|
if (loop_index % loop_index_divider == 0)
|
||||||
{
|
{
|
||||||
if (!MempoolStatus::read_network_info())
|
if (!MempoolStatus::read_network_info())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue