diff options
author | glozow <gloriajzhao@gmail.com> | 2023-03-06 16:46:18 +0000 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2023-08-29 16:41:22 +0100 |
commit | 51b3275cd1de467933f13d8b71286bf5ebd12b4b (patch) | |
tree | 94785b1417ebf58f7c622c5b390234836cb72f80 /src/txorphanage.cpp | |
parent | a33dde1e41d8923a46db84b50550175fa6149c48 (diff) |
[log] add category TXPACKAGES for orphanage and package relay
Diffstat (limited to 'src/txorphanage.cpp')
-rw-r--r-- | src/txorphanage.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp index de84ca5956..4fed6a60ed 100644 --- a/src/txorphanage.cpp +++ b/src/txorphanage.cpp @@ -35,7 +35,7 @@ bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer) unsigned int sz = GetTransactionWeight(*tx); if (sz > MAX_STANDARD_TX_WEIGHT) { - LogPrint(BCLog::MEMPOOL, "ignoring large orphan tx (size: %u, txid: %s, wtxid: %s)\n", sz, hash.ToString(), wtxid.ToString()); + LogPrint(BCLog::TXPACKAGES, "ignoring large orphan tx (size: %u, txid: %s, wtxid: %s)\n", sz, hash.ToString(), wtxid.ToString()); return false; } @@ -48,7 +48,7 @@ bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer) m_outpoint_to_orphan_it[txin.prevout].insert(ret.first); } - LogPrint(BCLog::MEMPOOL, "stored orphan tx %s (wtxid=%s) (mapsz %u outsz %u)\n", hash.ToString(), wtxid.ToString(), + LogPrint(BCLog::TXPACKAGES, "stored orphan tx %s (wtxid=%s) (mapsz %u outsz %u)\n", hash.ToString(), wtxid.ToString(), m_orphans.size(), m_outpoint_to_orphan_it.size()); return true; } @@ -107,7 +107,7 @@ void TxOrphanage::EraseForPeer(NodeId peer) nErased += EraseTxNoLock(maybeErase->second.tx->GetHash()); } } - if (nErased > 0) LogPrint(BCLog::MEMPOOL, "Erased %d orphan tx from peer=%d\n", nErased, peer); + if (nErased > 0) LogPrint(BCLog::TXPACKAGES, "Erased %d orphan tx from peer=%d\n", nErased, peer); } void TxOrphanage::LimitOrphans(unsigned int max_orphans) @@ -133,7 +133,7 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans) } // Sweep again 5 minutes after the next entry that expires in order to batch the linear scan. nNextSweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL; - if (nErased > 0) LogPrint(BCLog::MEMPOOL, "Erased %d orphan tx due to expiration\n", nErased); + if (nErased > 0) LogPrint(BCLog::TXPACKAGES, "Erased %d orphan tx due to expiration\n", nErased); } FastRandomContext rng; while (m_orphans.size() > max_orphans) @@ -143,7 +143,7 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans) EraseTxNoLock(m_orphan_list[randompos]->first); ++nEvicted; } - if (nEvicted > 0) LogPrint(BCLog::MEMPOOL, "orphanage overflow, removed %u tx\n", nEvicted); + if (nEvicted > 0) LogPrint(BCLog::TXPACKAGES, "orphanage overflow, removed %u tx\n", nEvicted); } void TxOrphanage::AddChildrenToWorkSet(const CTransaction& tx) @@ -234,6 +234,6 @@ void TxOrphanage::EraseForBlock(const CBlock& block) for (const uint256& orphanHash : vOrphanErase) { nErased += EraseTxNoLock(orphanHash); } - LogPrint(BCLog::MEMPOOL, "Erased %d orphan tx included or conflicted by block\n", nErased); + LogPrint(BCLog::TXPACKAGES, "Erased %d orphan tx included or conflicted by block\n", nErased); } } |