@@ -47,7 +47,7 @@ bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer)
47
47
m_outpoint_to_orphan_it[txin.prevout ].insert (ret.first );
48
48
}
49
49
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 ,
51
51
m_orphans.size (), m_outpoint_to_orphan_it.size ());
52
52
return true ;
53
53
}
@@ -84,7 +84,10 @@ int TxOrphanage::EraseTxNoLock(const Wtxid& wtxid)
84
84
it_last->second .list_pos = old_pos;
85
85
}
86
86
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 );
88
91
m_orphan_list.pop_back ();
89
92
90
93
m_orphans.erase (it);
@@ -107,7 +110,7 @@ void TxOrphanage::EraseForPeer(NodeId peer)
107
110
nErased += EraseTxNoLock (wtxid);
108
111
}
109
112
}
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);
111
114
}
112
115
113
116
void TxOrphanage::LimitOrphans (unsigned int max_orphans, FastRandomContext& rng)
@@ -230,7 +233,7 @@ void TxOrphanage::EraseForBlock(const CBlock& block)
230
233
for (const auto & orphanHash : vOrphanErase) {
231
234
nErased += EraseTxNoLock (orphanHash);
232
235
}
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);
234
237
}
235
238
}
236
239
0 commit comments