mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-03 22:03:01 +01:00
Merge bitcoin/bitcoin#31633: net: Disconnect message follow-ups to #28521
551a09486cnet: Switch to DisconnectMsg in CConnman (Hodlinator)bbac17608dnet: Bring back log message when resetting socket (Hodlinator)04b848e482net: Specify context in disconnecting log message (Hodlinator)0c4954ac7dnet_processing: Add missing use of DisconnectMsg (Hodlinator) Pull request description: - Add missing calls to `DisconnectMsg()` - https://github.com/bitcoin/bitcoin/pull/28521#discussion_r1890824361 - Specify context when stopping nodes - https://github.com/bitcoin/bitcoin/pull/28521#discussion_r1890780754 - Bring back log message when resetting socket in case new entrypoints are added - https://github.com/bitcoin/bitcoin/pull/28521#discussion_r1890795074 - Use `DisconnectMsg()` in `CConnman` as well - https://github.com/bitcoin/bitcoin/pull/28521#discussion_r1791797716 ACKs for top commit: Sjors: re-utACK551a09486cl0rinc: utACK551a09486cdavidgumberg: Tested and Review ACK551a09486cachow101: ACK551a09486cdanielabrozzoni: ACK551a09486cTree-SHA512: 95ab8e7436e20ca3abc949ea09697facb6fbeb19981ddc7e0bf294e7ec914e72cbf836c21184a2a887f04cb264f26daf5b0cbcbebc9db633a7b1672b4e488063
This commit is contained in:
@@ -4205,7 +4205,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
|
||||
if (msg_type == NetMsgType::TX) {
|
||||
if (RejectIncomingTxs(pfrom)) {
|
||||
LogDebug(BCLog::NET, "transaction sent in violation of protocol peer=%d\n", pfrom.GetId());
|
||||
LogDebug(BCLog::NET, "transaction sent in violation of protocol, %s", pfrom.DisconnectMsg(fLogIPs));
|
||||
pfrom.fDisconnect = true;
|
||||
return;
|
||||
}
|
||||
@@ -5207,7 +5207,7 @@ void PeerManagerImpl::MaybeSendPing(CNode& node_to, Peer& peer, std::chrono::mic
|
||||
{
|
||||
// The ping timeout is using mocktime. To disable the check during
|
||||
// testing, increase -peertimeout.
|
||||
LogDebug(BCLog::NET, "ping timeout: %fs peer=%d\n", 0.000001 * count_microseconds(now - peer.m_ping_start.load()), peer.m_id);
|
||||
LogDebug(BCLog::NET, "ping timeout: %fs, %s", 0.000001 * count_microseconds(now - peer.m_ping_start.load()), node_to.DisconnectMsg(fLogIPs));
|
||||
node_to.fDisconnect = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user