@@ -1852,7 +1852,7 @@ void PeerManagerImpl::BlockConnected(const std::shared_ptr<const CBlock>& pblock
1852
1852
LOCK (m_recent_confirmed_transactions_mutex);
1853
1853
for (const auto & ptx : pblock->vtx ) {
1854
1854
m_recent_confirmed_transactions.insert (ptx->GetHash ());
1855
- if (ptx->GetHash () != ptx-> GetWitnessHash ()) {
1855
+ if (ptx->HasWitness ()) {
1856
1856
m_recent_confirmed_transactions.insert (ptx->GetWitnessHash ());
1857
1857
}
1858
1858
}
@@ -2976,7 +2976,7 @@ bool PeerManagerImpl::ProcessOrphanTx(Peer& peer)
2976
2976
// processing of this transaction in the event that child
2977
2977
// transactions are later received (resulting in
2978
2978
// parent-fetching by txid via the orphan-handling logic).
2979
- if (state.GetResult () == TxValidationResult::TX_INPUTS_NOT_STANDARD && porphanTx->GetWitnessHash () != porphanTx-> GetHash ()) {
2979
+ if (state.GetResult () == TxValidationResult::TX_INPUTS_NOT_STANDARD && porphanTx->HasWitness ()) {
2980
2980
// We only add the txid if it differs from the wtxid, to
2981
2981
// avoid wasting entries in the rolling bloom filter.
2982
2982
m_recent_rejects.insert (porphanTx->GetHash ());
@@ -4260,7 +4260,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
4260
4260
// processing of this transaction in the event that child
4261
4261
// transactions are later received (resulting in
4262
4262
// parent-fetching by txid via the orphan-handling logic).
4263
- if (state.GetResult () == TxValidationResult::TX_INPUTS_NOT_STANDARD && tx.GetWitnessHash () != tx. GetHash ()) {
4263
+ if (state.GetResult () == TxValidationResult::TX_INPUTS_NOT_STANDARD && tx.HasWitness ()) {
4264
4264
m_recent_rejects.insert (tx.GetHash ());
4265
4265
m_txrequest.ForgetTxHash (tx.GetHash ());
4266
4266
}
0 commit comments