net: move privatebroadcast logs to debug category

Private broadcast is a privacy feature, and users may share `debug.log` with support.
Unconditional log messages that mention private broadcast and/or include (w)txids can leak which transactions a user originated.

Move private broadcast event logging from `LogInfo()` to `LogDebug(BCLog::PRIVBROADCAST, ...)` so it is only emitted when debug logging is enabled, and drop the hardcoded "[privatebroadcast]" prefixes.
Keep warnings at the default log level without (w)txids, detailed context remains available under `-debug=privatebroadcast`.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
Lőrinc
2026-01-13 12:01:28 +01:00
parent 796f18e559
commit 31b771a942
2 changed files with 20 additions and 20 deletions

View File

@@ -3239,7 +3239,7 @@ void CConnman::ThreadPrivateBroadcast()
std::optional<Proxy> proxy;
const std::optional<Network> net{m_private_broadcast.PickNetwork(proxy)};
if (!net.has_value()) {
LogWarning("[privatebroadcast] Connections needed but none of the Tor or I2P networks is reachable");
LogWarning("Unable to open -privatebroadcast connections: neither Tor nor I2P is reachable");
m_interrupt_net->sleep_for(5s);
continue;
}