Skip to content

Commit bfc4d24

Browse files
committed
log: restore LogPrintLevel messages from prior backports
1 parent d5955dd commit bfc4d24

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/net_processing.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3763,19 +3763,19 @@ void PeerManagerImpl::ProcessMessage(
37633763
// from switching announcement protocols after the connection is up.
37643764
if (msg_type == NetMsgType::SENDTXRCNCL) {
37653765
if (!m_txreconciliation) {
3766-
LogPrint(BCLog::NET, "sendtxrcncl from peer=%d ignored, as our node does not have txreconciliation enabled\n", pfrom.GetId());
3766+
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "sendtxrcncl from peer=%d ignored, as our node does not have txreconciliation enabled\n", pfrom.GetId());
37673767
return;
37683768
}
37693769

37703770
if (pfrom.fSuccessfullyConnected) {
3771-
LogPrint(BCLog::NET, "sendtxrcncl received after verack from peer=%d; disconnecting\n", pfrom.GetId());
3771+
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "sendtxrcncl received after verack from peer=%d; disconnecting\n", pfrom.GetId());
37723772
pfrom.fDisconnect = true;
37733773
return;
37743774
}
37753775

37763776
// Peer must not offer us reconciliations if we specified no tx relay support in VERSION.
37773777
if (RejectIncomingTxs(pfrom)) {
3778-
LogPrint(BCLog::NET, "sendtxrcncl received from peer=%d to which we indicated no tx relay; disconnecting\n", pfrom.GetId());
3778+
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "sendtxrcncl received from peer=%d to which we indicated no tx relay; disconnecting\n", pfrom.GetId());
37793779
pfrom.fDisconnect = true;
37803780
return;
37813781
}
@@ -3784,7 +3784,7 @@ void PeerManagerImpl::ProcessMessage(
37843784
// This flag might also be false in other cases, but the RejectIncomingTxs check above
37853785
// eliminates them, so that this flag fully represents what we are looking for.
37863786
if (!pfrom.m_relays_txs) {
3787-
LogPrint(BCLog::NET, "sendtxrcncl received from peer=%d which indicated no tx relay to us; disconnecting\n", pfrom.GetId());
3787+
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "sendtxrcncl received from peer=%d which indicated no tx relay to us; disconnecting\n", pfrom.GetId());
37883788
pfrom.fDisconnect = true;
37893789
return;
37903790
}
@@ -3797,16 +3797,16 @@ void PeerManagerImpl::ProcessMessage(
37973797
peer_txreconcl_version, remote_salt);
37983798
switch (result) {
37993799
case ReconciliationRegisterResult::NOT_FOUND:
3800-
LogPrint(BCLog::NET, "Ignore unexpected txreconciliation signal from peer=%d\n", pfrom.GetId());
3800+
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "Ignore unexpected txreconciliation signal from peer=%d\n", pfrom.GetId());
38013801
break;
38023802
case ReconciliationRegisterResult::SUCCESS:
38033803
break;
38043804
case ReconciliationRegisterResult::ALREADY_REGISTERED:
3805-
LogPrint(BCLog::NET, "txreconciliation protocol violation from peer=%d (sendtxrcncl received from already registered peer); disconnecting\n", pfrom.GetId());
3805+
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "txreconciliation protocol violation from peer=%d (sendtxrcncl received from already registered peer); disconnecting\n", pfrom.GetId());
38063806
pfrom.fDisconnect = true;
38073807
return;
38083808
case ReconciliationRegisterResult::PROTOCOL_VIOLATION:
3809-
LogPrint(BCLog::NET, "txreconciliation protocol violation from peer=%d; disconnecting\n", pfrom.GetId());
3809+
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "txreconciliation protocol violation from peer=%d; disconnecting\n", pfrom.GetId());
38103810
pfrom.fDisconnect = true;
38113811
return;
38123812
}

src/node/txreconciliation.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class TxReconciliationTracker::Impl
8383
AssertLockNotHeld(m_txreconciliation_mutex);
8484
LOCK(m_txreconciliation_mutex);
8585

86-
LogPrint(BCLog::TXRECONCILIATION, "Pre-register peer=%d\n", peer_id);
86+
LogPrintLevel(BCLog::TXRECONCILIATION, BCLog::Level::Debug, "Pre-register peer=%d\n", peer_id);
8787
const uint64_t local_salt{GetRand(UINT64_MAX)};
8888

8989
// We do this exactly once per peer (which are unique by NodeId, see GetNewNodeId) so it's
@@ -116,7 +116,8 @@ class TxReconciliationTracker::Impl
116116
// v1 is the lowest version, so suggesting something below must be a protocol violation.
117117
if (recon_version < 1) return ReconciliationRegisterResult::PROTOCOL_VIOLATION;
118118

119-
LogPrint(BCLog::TXRECONCILIATION, "Register peer=%d (inbound=%i)\n", peer_id, is_peer_inbound);
119+
LogPrintLevel(BCLog::TXRECONCILIATION, BCLog::Level::Debug, "Register peer=%d (inbound=%i)\n",
120+
peer_id, is_peer_inbound);
120121

121122
const uint256 full_salt{ComputeSalt(local_salt, remote_salt)};
122123
recon_state->second = TxReconciliationState(!is_peer_inbound, full_salt.GetUint64(0), full_salt.GetUint64(1));
@@ -128,7 +129,7 @@ class TxReconciliationTracker::Impl
128129
AssertLockNotHeld(m_txreconciliation_mutex);
129130
LOCK(m_txreconciliation_mutex);
130131
if (m_states.erase(peer_id)) {
131-
LogPrint(BCLog::TXRECONCILIATION, "Forget txreconciliation state of peer=%d\n", peer_id);
132+
LogPrintLevel(BCLog::TXRECONCILIATION, BCLog::Level::Debug, "Forget txreconciliation state of peer=%d\n", peer_id);
132133
}
133134
}
134135

0 commit comments

Comments
 (0)