aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2023-08-09 15:25:34 +0200
committerglozow <gloriajzhao@gmail.com>2023-08-29 16:41:22 +0100
commita33dde1e41d8923a46db84b50550175fa6149c48 (patch)
treea31ad612177515d1919f7daf49f7e04f32dfbcaa /src/txorphanage.cpp
parentab42b2ebdbf61225e636e4c00068fd29b2790d41 (diff)
[log] include wtxid in tx {relay,validation,orphanage} logging
Diffstat (limited to 'src/txorphanage.cpp')
-rw-r--r--src/txorphanage.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp
index af86baa8ac..de84ca5956 100644
--- a/src/txorphanage.cpp
+++ b/src/txorphanage.cpp
@@ -21,6 +21,7 @@ bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer)
LOCK(m_mutex);
const uint256& hash = tx->GetHash();
+ const uint256& wtxid = tx->GetWitnessHash();
if (m_orphans.count(hash))
return false;
@@ -34,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, hash: %s)\n", sz, hash.ToString());
+ LogPrint(BCLog::MEMPOOL, "ignoring large orphan tx (size: %u, txid: %s, wtxid: %s)\n", sz, hash.ToString(), wtxid.ToString());
return false;
}
@@ -47,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 (mapsz %u outsz %u)\n", hash.ToString(),
+ LogPrint(BCLog::MEMPOOL, "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;
}