diff --git a/src/seeder/db.h b/src/seeder/db.h --- a/src/seeder/db.h +++ b/src/seeder/db.h @@ -130,7 +130,7 @@ return false; } - int GetBanTime() const { + int64_t GetBanTime() const { if (IsGood()) { return 0; } @@ -152,7 +152,7 @@ return 0; } - int GetIgnoreTime() const { + int64_t GetIgnoreTime() const { if (IsGood()) { return 0; } @@ -284,7 +284,7 @@ public: // nodes that are banned, with their unban time (a) - std::map banned; + std::map banned; void GetStats(CAddrDbStats &stats) { LOCK(cs); diff --git a/src/seeder/db.cpp b/src/seeder/db.cpp --- a/src/seeder/db.cpp +++ b/src/seeder/db.cpp @@ -3,7 +3,7 @@ #include void CAddrInfo::Update(bool good) { - uint32_t now = time(nullptr); + int64_t now = time(nullptr); if (ourLastTry == 0) ourLastTry = now - MIN_RETRY; int age = now - ourLastTry; lastTry = now; @@ -18,7 +18,7 @@ stat1D.Update(good, age, 3600 * 24); stat1W.Update(good, age, 3600 * 24 * 7); stat1M.Update(good, age, 3600 * 24 * 30); - int ign = GetIgnoreTime(); + int64_t ign = GetIgnoreTime(); if (ign && (ignoreTill == 0 || ignoreTill < ign + now)) ignoreTill = ign + now; // printf("%s: got %s result: success=%i/%i; 2H:%.2f%%-%.2f%%(%.2f)