From 21cca9ec2993223260b8952266cfa7a3e0702925 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 18 Jun 2021 11:41:47 -0400 Subject: [PATCH] Only dump zindex.dat if -zindex is enabled --- src/net.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index 51bc90f19..218f766d3 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2010,8 +2010,10 @@ void StartNode(boost::thread_group& threadGroup, CScheduler& scheduler) // Dump network addresses scheduler.scheduleEvery(&DumpAddresses, DUMP_ADDRESSES_INTERVAL); - // Dump zindex stats - scheduler.scheduleEvery(&DumpZindexStats, DUMP_ZINDEX_INTERVAL); + // Dump zindex stats if -zindex is enabled + if (fZindex) { + scheduler.scheduleEvery(&DumpZindexStats, DUMP_ZINDEX_INTERVAL); + } } bool StopNode()