@@ -47,7 +47,7 @@ bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer)
4747 m_outpoint_to_orphan_it[txin.prevout ].insert (ret.first );
4848 }
4949
50- LogPrint (BCLog::TXPACKAGES, " stored orphan tx %s (wtxid=%s) (mapsz %u outsz %u)\n " , hash.ToString (), wtxid.ToString (),
50+ LogPrint (BCLog::TXPACKAGES, " stored orphan tx %s (wtxid=%s), weight: %u (mapsz %u outsz %u)\n " , hash.ToString (), wtxid.ToString (), sz ,
5151 m_orphans.size (), m_outpoint_to_orphan_it.size ());
5252 return true ;
5353}
@@ -84,7 +84,10 @@ int TxOrphanage::EraseTxNoLock(const Wtxid& wtxid)
8484 it_last->second .list_pos = old_pos;
8585 }
8686 const auto & txid = it->second .tx ->GetHash ();
87- LogPrint (BCLog::TXPACKAGES, " removed orphan tx %s (wtxid=%s)\n " , txid.ToString (), wtxid.ToString ());
87+ // Time spent in orphanage = difference between current and entry time.
88+ // Entry time is equal to ORPHAN_TX_EXPIRE_TIME earlier than entry's expiry.
89+ LogPrint (BCLog::TXPACKAGES, " removed orphan tx %s (wtxid=%s) after %ds\n " , txid.ToString (), wtxid.ToString (),
90+ GetTime () + ORPHAN_TX_EXPIRE_TIME - it->second .nTimeExpire );
8891 m_orphan_list.pop_back ();
8992
9093 m_orphans.erase (it);
@@ -107,7 +110,7 @@ void TxOrphanage::EraseForPeer(NodeId peer)
107110 nErased += EraseTxNoLock (wtxid);
108111 }
109112 }
110- if (nErased > 0 ) LogPrint (BCLog::TXPACKAGES, " Erased %d orphan tx from peer=%d\n " , nErased, peer);
113+ if (nErased > 0 ) LogPrint (BCLog::TXPACKAGES, " Erased %d orphan transaction(s) from peer=%d\n " , nErased, peer);
111114}
112115
113116void TxOrphanage::LimitOrphans (unsigned int max_orphans, FastRandomContext& rng)
@@ -230,7 +233,7 @@ void TxOrphanage::EraseForBlock(const CBlock& block)
230233 for (const auto & orphanHash : vOrphanErase) {
231234 nErased += EraseTxNoLock (orphanHash);
232235 }
233- LogPrint (BCLog::TXPACKAGES, " Erased %d orphan tx included or conflicted by block\n " , nErased);
236+ LogPrint (BCLog::TXPACKAGES, " Erased %d orphan transaction(s) included or conflicted by block\n " , nErased);
234237 }
235238}
236239
0 commit comments