@@ -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.
@@ -1731,15 +1731,15 @@ bool PeerManagerImpl::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidati
1731
1731
return false ;
1732
1732
}
1733
1733
1734
- bool PeerManagerImpl::MaybePunishNodeForTx (NodeId nodeid, const TxValidationState& state, const std::string& message )
1734
+ bool PeerManagerImpl::MaybePunishNodeForTx (NodeId nodeid, const TxValidationState& state)
1735
1735
{
1736
1736
PeerRef peer{GetPeerRef (nodeid)};
1737
1737
switch (state.GetResult ()) {
1738
1738
case TxValidationResult::TX_RESULT_UNSET:
1739
1739
break ;
1740
1740
// The node is providing invalid data:
1741
1741
case TxValidationResult::TX_CONSENSUS:
1742
- if (peer) Misbehaving (*peer, 100 , message );
1742
+ if (peer) Misbehaving (*peer, 100 , " " );
1743
1743
return true ;
1744
1744
// Conflicting (but not necessarily invalid) data or different policy:
1745
1745
case TxValidationResult::TX_RECENT_CONSENSUS_CHANGE:
@@ -1754,9 +1754,6 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
1754
1754
case TxValidationResult::TX_NO_MEMPOOL:
1755
1755
break ;
1756
1756
}
1757
- if (message != " " ) {
1758
- LogPrint (BCLog::NET, " peer=%d: %s\n " , nodeid, message);
1759
- }
1760
1757
return false ;
1761
1758
}
1762
1759
0 commit comments