@@ -2048,7 +2048,6 @@ void PeerManager::ProcessOrphanTx(std::set<uint256>& orphan_work_set, std::list<
2048
2048
{
2049
2049
AssertLockHeld (cs_main);
2050
2050
AssertLockHeld (g_cs_orphans);
2051
- std::set<NodeId> setMisbehaving;
2052
2051
2053
2052
while (!orphan_work_set.empty ()) {
2054
2053
const uint256 orphanHash = *orphan_work_set.begin ();
@@ -2065,7 +2064,6 @@ void PeerManager::ProcessOrphanTx(std::set<uint256>& orphan_work_set, std::list<
2065
2064
// that relayed the previous transaction).
2066
2065
TxValidationState orphan_state;
2067
2066
2068
- if (setMisbehaving.count (fromPeer)) continue ;
2069
2067
if (AcceptToMemoryPool (m_mempool, orphan_state, porphanTx, &removed_txn, false /* bypass_limits */ , 0 /* nAbsurdFee */ )) {
2070
2068
LogPrint (BCLog::MEMPOOL, " accepted orphan tx %s\n " , orphanHash.ToString ());
2071
2069
RelayTransaction (orphanHash, porphanTx->GetWitnessHash (), m_connman);
@@ -2081,14 +2079,12 @@ void PeerManager::ProcessOrphanTx(std::set<uint256>& orphan_work_set, std::list<
2081
2079
break ;
2082
2080
} else if (orphan_state.GetResult () != TxValidationResult::TX_MISSING_INPUTS) {
2083
2081
if (orphan_state.IsInvalid ()) {
2084
- // Punish peer that gave us an invalid orphan tx
2085
- if (MaybePunishNodeForTx (fromPeer, orphan_state)) {
2086
- setMisbehaving.insert (fromPeer);
2087
- }
2088
2082
LogPrint (BCLog::MEMPOOL, " invalid orphan tx %s from peer=%d. %s\n " ,
2089
2083
orphanHash.ToString (),
2090
2084
fromPeer,
2091
2085
orphan_state.ToString ());
2086
+ // Maybe punish peer that gave us an invalid orphan tx
2087
+ MaybePunishNodeForTx (fromPeer, orphan_state);
2092
2088
}
2093
2089
// Has inputs but not accepted to mempool
2094
2090
// Probably non-standard or insufficient fee
0 commit comments