@@ -2057,14 +2057,12 @@ void PeerManager::ProcessOrphanTx(std::set<uint256>& orphan_work_set, std::list<
2057
2057
if (orphan_it == mapOrphanTransactions.end ()) continue ;
2058
2058
2059
2059
const CTransactionRef porphanTx = orphan_it->second .tx ;
2060
- const CTransaction& orphanTx = *porphanTx;
2061
- NodeId fromPeer = orphan_it->second .fromPeer ;
2062
2060
TxValidationState state;
2063
2061
2064
2062
if (AcceptToMemoryPool (m_mempool, state, porphanTx, &removed_txn, false /* bypass_limits */ , 0 /* nAbsurdFee */ )) {
2065
2063
LogPrint (BCLog::MEMPOOL, " accepted orphan tx %s\n " , orphanHash.ToString ());
2066
2064
RelayTransaction (orphanHash, porphanTx->GetWitnessHash (), m_connman);
2067
- for (unsigned int i = 0 ; i < orphanTx. vout .size (); i++) {
2065
+ for (unsigned int i = 0 ; i < porphanTx-> vout .size (); i++) {
2068
2066
auto it_by_prev = mapOrphanTransactionsByPrev.find (COutPoint (orphanHash, i));
2069
2067
if (it_by_prev != mapOrphanTransactionsByPrev.end ()) {
2070
2068
for (const auto & elem : it_by_prev->second ) {
@@ -2078,10 +2076,10 @@ void PeerManager::ProcessOrphanTx(std::set<uint256>& orphan_work_set, std::list<
2078
2076
if (state.IsInvalid ()) {
2079
2077
LogPrint (BCLog::MEMPOOL, " invalid orphan tx %s from peer=%d. %s\n " ,
2080
2078
orphanHash.ToString (),
2081
- fromPeer,
2079
+ orphan_it-> second . fromPeer ,
2082
2080
state.ToString ());
2083
2081
// Maybe punish peer that gave us an invalid orphan tx
2084
- MaybePunishNodeForTx (fromPeer, state);
2082
+ MaybePunishNodeForTx (orphan_it-> second . fromPeer , state);
2085
2083
}
2086
2084
// Has inputs but not accepted to mempool
2087
2085
// Probably non-standard or insufficient fee
@@ -2101,7 +2099,7 @@ void PeerManager::ProcessOrphanTx(std::set<uint256>& orphan_work_set, std::list<
2101
2099
// for concerns around weakening security of unupgraded nodes
2102
2100
// if we start doing this too early.
2103
2101
assert (recentRejects);
2104
- recentRejects->insert (orphanTx. GetWitnessHash ());
2102
+ recentRejects->insert (porphanTx-> GetWitnessHash ());
2105
2103
// If the transaction failed for TX_INPUTS_NOT_STANDARD,
2106
2104
// then we know that the witness was irrelevant to the policy
2107
2105
// failure, since this check depends only on the txid
@@ -2110,10 +2108,10 @@ void PeerManager::ProcessOrphanTx(std::set<uint256>& orphan_work_set, std::list<
2110
2108
// processing of this transaction in the event that child
2111
2109
// transactions are later received (resulting in
2112
2110
// parent-fetching by txid via the orphan-handling logic).
2113
- if (state.GetResult () == TxValidationResult::TX_INPUTS_NOT_STANDARD && orphanTx. GetWitnessHash () != orphanTx. GetHash ()) {
2111
+ if (state.GetResult () == TxValidationResult::TX_INPUTS_NOT_STANDARD && porphanTx-> GetWitnessHash () != porphanTx-> GetHash ()) {
2114
2112
// We only add the txid if it differs from the wtxid, to
2115
2113
// avoid wasting entries in the rolling bloom filter.
2116
- recentRejects->insert (orphanTx. GetHash ());
2114
+ recentRejects->insert (porphanTx-> GetHash ());
2117
2115
}
2118
2116
}
2119
2117
EraseOrphanTx (orphanHash);
0 commit comments