diff options
| author | fanquake <[email protected]> | 2020-07-09 20:10:49 +0800 |
|---|---|---|
| committer | fanquake <[email protected]> | 2020-07-09 20:29:31 +0800 |
| commit | e3b31255c5ad8841023231ce843a27789d996ff6 (patch) | |
| tree | 9852682be29b4e9a6d84950216d07d93cca4cc4e | |
| parent | Merge #19454: tools: `.clang-format` compat with clang versions < 9 (diff) | |
| parent | banlist: log post-swept banlist size at startup (diff) | |
| download | discoin-e3b31255c5ad8841023231ce843a27789d996ff6.tar.xz discoin-e3b31255c5ad8841023231ce843a27789d996ff6.zip | |
Merge #19470: banlist: log post-swept banlist size at startup
0b8ba84659b56b12d74587ea31b6062fce887ba3 banlist: log post-swept banlist size at startup (fanquake)
Pull request description:
We are currently logging the size of the banlist from before `SweepBanned()` has been called, meaning the value may be incorrect.
i.e banlist.dat had `1`ban. That ban is swept on startup. We log "loaded 1 banned node..". Actual banlist size is `0`.
ACKs for top commit:
jonatack:
Code review ACK 0b8ba84659b `m_banned` is set in SetBanned and is updated by SweepBanned before the logging.
laanwj:
Code review ACK 0b8ba84659b56b12d74587ea31b6062fce887ba3
jnewbery:
Code review ACK 0b8ba84659b56b12d74587ea31b6062fce887ba3
Tree-SHA512: 1d6e363d6c68d7cc214dd685df3d2d27572f6a58a4c0e43c03cfbb03bc01badb6a10ecae403d137094bb316d27f33feb6be15b4e23ef1e9496cd0b3c23c21698
| -rw-r--r-- | src/banman.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/banman.cpp b/src/banman.cpp index 2fabacda0..8752185a6 100644 --- a/src/banman.cpp +++ b/src/banman.cpp @@ -26,7 +26,7 @@ BanMan::BanMan(fs::path ban_file, CClientUIInterface* client_interface, int64_t SweepBanned(); // sweep out unused entries LogPrint(BCLog::NET, "Loaded %d banned node ips/subnets from banlist.dat %dms\n", - banmap.size(), GetTimeMillis() - n_start); + m_banned.size(), GetTimeMillis() - n_start); } else { LogPrintf("Invalid or missing banlist.dat; recreating\n"); SetBannedSetDirty(true); // force write |