aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/txorphanage.cpp')
-rw-r--r--src/txorphanage.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp
index 473abd5044..6baea9f69e 100644
--- a/src/txorphanage.cpp
+++ b/src/txorphanage.cpp
@@ -129,3 +129,11 @@ bool HaveOrphanTx(const GenTxid& gtxid)
}
}
+std::pair<CTransactionRef, NodeId> GetOrphanTx(const uint256& txid)
+{
+ AssertLockHeld(g_cs_orphans);
+
+ const auto it = mapOrphanTransactions.find(txid);
+ if (it == mapOrphanTransactions.end()) return {nullptr, -1};
+ return {it->second.tx, it->second.fromPeer};
+}