aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2023-01-27 15:46:20 -0500
committerMartin Zumsande <mzumsande@gmail.com>2023-01-29 17:35:15 -0500
commitb2a1e477444bfb90328b353e89967ace6ef10918 (patch)
treea59c90ae4d53f18fced2d39823a7dc44f6c59aef
parent6548ba68e85298c01b983c2392aab86e88e447d3 (diff)
net_processing: simplify logging statement
Also use count_seconds() instead of count() for type safety.
-rw-r--r--src/net_processing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index d496cad317..a659300a0d 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1845,7 +1845,7 @@ void PeerManagerImpl::BlockConnected(const std::shared_ptr<const CBlock>& pblock
if (stalling_timeout != BLOCK_STALLING_TIMEOUT_DEFAULT) {
const auto new_timeout = std::max(std::chrono::duration_cast<std::chrono::seconds>(stalling_timeout * 0.85), BLOCK_STALLING_TIMEOUT_DEFAULT);
if (m_block_stalling_timeout.compare_exchange_strong(stalling_timeout, new_timeout)) {
- LogPrint(BCLog::NET, "Decreased stalling timeout to %d seconds\n", new_timeout.count());
+ LogPrint(BCLog::NET, "Decreased stalling timeout to %d seconds\n", count_seconds(new_timeout));
}
}
}
@@ -5736,7 +5736,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
// bandwidth is insufficient.
const auto new_timeout = std::min(2 * stalling_timeout, BLOCK_STALLING_TIMEOUT_MAX);
if (stalling_timeout != new_timeout && m_block_stalling_timeout.compare_exchange_strong(stalling_timeout, new_timeout)) {
- LogPrint(BCLog::NET, "Increased stalling timeout temporarily to %d seconds\n", m_block_stalling_timeout.load().count());
+ LogPrint(BCLog::NET, "Increased stalling timeout temporarily to %d seconds\n", count_seconds(new_timeout));
}
return true;
}