Skip to content

Commit 9fe5f6d

Browse files
committed
MaybePunishNodeForTx: Remove unused message arg and logging
1 parent 6a47337 commit 9fe5f6d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ class PeerManagerImpl final : public PeerManager
568568
*
569569
* @return Returns true if the peer was punished (probably disconnected)
570570
*/
571-
bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message = "")
571+
bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state)
572572
EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
573573

574574
/** Maybe disconnect a peer and discourage future connections from its address.
@@ -1731,15 +1731,15 @@ bool PeerManagerImpl::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidati
17311731
return false;
17321732
}
17331733

1734-
bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message)
1734+
bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state)
17351735
{
17361736
PeerRef peer{GetPeerRef(nodeid)};
17371737
switch (state.GetResult()) {
17381738
case TxValidationResult::TX_RESULT_UNSET:
17391739
break;
17401740
// The node is providing invalid data:
17411741
case TxValidationResult::TX_CONSENSUS:
1742-
if (peer) Misbehaving(*peer, 100, message);
1742+
if (peer) Misbehaving(*peer, 100, "");
17431743
return true;
17441744
// Conflicting (but not necessarily invalid) data or different policy:
17451745
case TxValidationResult::TX_RECENT_CONSENSUS_CHANGE:
@@ -1754,9 +1754,6 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
17541754
case TxValidationResult::TX_NO_MEMPOOL:
17551755
break;
17561756
}
1757-
if (message != "") {
1758-
LogPrint(BCLog::NET, "peer=%d: %s\n", nodeid, message);
1759-
}
17601757
return false;
17611758
}
17621759

0 commit comments

Comments
 (0)