@@ -568,7 +568,7 @@ class PeerManagerImpl final : public PeerManager
568
568
*
569
569
* @return Returns true if the peer was punished (probably disconnected)
570
570
*/
571
- bool MaybePunishNodeForTx (NodeId nodeid, const TxValidationState& state, const std::string& message = " " )
571
+ bool MaybePunishNodeForTx (NodeId nodeid, const TxValidationState& state)
572
572
EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
573
573
574
574
/* * Maybe disconnect a peer and discourage future connections from its address.
@@ -1735,15 +1735,15 @@ bool PeerManagerImpl::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidati
1735
1735
return false ;
1736
1736
}
1737
1737
1738
- bool PeerManagerImpl::MaybePunishNodeForTx (NodeId nodeid, const TxValidationState& state, const std::string& message )
1738
+ bool PeerManagerImpl::MaybePunishNodeForTx (NodeId nodeid, const TxValidationState& state)
1739
1739
{
1740
1740
PeerRef peer{GetPeerRef (nodeid)};
1741
1741
switch (state.GetResult ()) {
1742
1742
case TxValidationResult::TX_RESULT_UNSET:
1743
1743
break ;
1744
1744
// The node is providing invalid data:
1745
1745
case TxValidationResult::TX_CONSENSUS:
1746
- if (peer) Misbehaving (*peer, 100 , message );
1746
+ if (peer) Misbehaving (*peer, 100 , " " );
1747
1747
return true ;
1748
1748
// Conflicting (but not necessarily invalid) data or different policy:
1749
1749
case TxValidationResult::TX_RECENT_CONSENSUS_CHANGE:
@@ -1758,9 +1758,6 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
1758
1758
case TxValidationResult::TX_NO_MEMPOOL:
1759
1759
break ;
1760
1760
}
1761
- if (message != " " ) {
1762
- LogPrint (BCLog::NET, " peer=%d: %s\n " , nodeid, message);
1763
- }
1764
1761
return false ;
1765
1762
}
1766
1763
0 commit comments