aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-06-24 00:23:28 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2013-06-24 11:48:14 +0200
commitc43da3f183819f3def8a4d128489dafeef9307e6 (patch)
tree09f6d606ef372e776bec259f6ca63037ab6b816e /src/net.cpp
parentfd967fed89a294622f24c8e97c0ed23afb969edd (diff)
downloadbitcoin-c43da3f183819f3def8a4d128489dafeef9307e6.tar.xz
Dump addresses every 15 minutes instead of 10 seconds
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 0adf26ef0d..5418c3de40 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -22,6 +22,9 @@
#include <miniupnpc/upnperrors.h>
#endif
+// Dump addresses to peers.dat every 15 minutes (900s)
+#define DUMP_ADDRESSES_INTERVAL 900
+
using namespace std;
using namespace boost;
@@ -1730,7 +1733,7 @@ void StartNode(boost::thread_group& threadGroup)
threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "msghand", &ThreadMessageHandler));
// Dump network addresses
- threadGroup.create_thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 10000));
+ threadGroup.create_thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, DUMP_ADDRESSES_INTERVAL * 1000));
}
bool StopNode()