From 9943b90c5454e0dd602fb2fb4c83464a64e11607 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 15 Apr 2013 12:01:32 +0200 Subject: [PATCH] Gradually decrease dump frequency --- Makefile | 2 +- main.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2f8bde1..99ea311 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CXXFLAGS = -O3 -g0 -march=native -flto +CXXFLAGS = -O3 -g0 -march=nocona -flto LDFLAGS = $(CXXFLAGS) dnsseed: dns.o bitcoin.o netbase.o protocol.o db.o main.o util.o diff --git a/main.cpp b/main.cpp index 442ab2e..fad20c9 100644 --- a/main.cpp +++ b/main.cpp @@ -267,8 +267,11 @@ int StatCompare(const CAddrReport& a, const CAddrReport& b) { } extern "C" void* ThreadDumper(void*) { + int count = 0; do { - Sleep(100000); + Sleep(100000 << count); // First 100s, than 200s, 400s, 800s, 1600s, and then 3200s forever + if (count < 5) + count++; { vector v = db.GetAll(); sort(v.begin(), v.end(), StatCompare);