diff options
Diffstat (limited to 'src/txorphanage.h')
-rw-r--r-- | src/txorphanage.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/txorphanage.h b/src/txorphanage.h index 2fd14e6fd2..a3c8edaa2a 100644 --- a/src/txorphanage.h +++ b/src/txorphanage.h @@ -51,6 +51,14 @@ public: /** Does this peer have any work to do? */ bool HaveTxToReconsider(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex);; + /** Get all children that spend from this tx and were received from nodeid. Sorted from most + * recent to least recent. */ + std::vector<CTransactionRef> GetChildrenFromSamePeer(const CTransactionRef& parent, NodeId nodeid) const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex); + + /** Get all children that spend from this tx but were not received from nodeid. Also return + * which peer provided each tx. */ + std::vector<std::pair<CTransactionRef, NodeId>> GetChildrenFromDifferentPeer(const CTransactionRef& parent, NodeId nodeid) const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex); + /** Return how many entries exist in the orphange */ size_t Size() EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) { |