Browse Source

Gradually decrease dump frequency

pull/1/head
Pieter Wuille 12 years ago
parent
commit
9943b90c54
  1. 2
      Makefile
  2. 5
      main.cpp

2
Makefile

@ -1,4 +1,4 @@ @@ -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

5
main.cpp

@ -267,8 +267,11 @@ int StatCompare(const CAddrReport& a, const CAddrReport& b) { @@ -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<CAddrReport> v = db.GetAll();
sort(v.begin(), v.end(), StatCompare);

Loading…
Cancel
Save