From fa36f3a29538012a6eb5c3402b3b3c18fd32b230 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 10 Mar 2020 09:58:49 -0400 Subject: [PATCH] refactor: move DUMP_BANS_INTERVAL to banman.h --- src/banman.h | 9 ++++++--- src/init.cpp | 4 ---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/banman.h b/src/banman.h index 89848749140..6bea2e75e94 100644 --- a/src/banman.h +++ b/src/banman.h @@ -5,16 +5,19 @@ #ifndef BITCOIN_BANMAN_H #define BITCOIN_BANMAN_H -#include -#include - #include #include #include // For banmap_t #include +#include +#include +#include + // NOTE: When adjusting this, update rpcnet:setban's help ("24h") static constexpr unsigned int DEFAULT_MISBEHAVING_BANTIME = 60 * 60 * 24; // Default 24-hour ban +// How often to dump addresses to banlist.dat +static constexpr std::chrono::minutes DUMP_BANS_INTERVAL{15}; class CClientUIInterface; class CNetAddr; diff --git a/src/init.cpp b/src/init.cpp index eaabcf73829..22d5b8660ae 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -86,10 +86,6 @@ static const bool DEFAULT_PROXYRANDOMIZE = true; static const bool DEFAULT_REST_ENABLE = false; static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false; -// How often to dump addresses to banlist.dat -static constexpr std::chrono::minutes DUMP_BANS_INTERVAL{15}; - - #ifdef WIN32 // Win32 LevelDB doesn't use filedescriptors, and the ones used for // accessing block files don't count towards the fd_set size limit