CTxMemPool::GetTransactionAncestry

Calculate the ancestor and cluster count for the given transaction. The counts include the transaction itself. When ancestors is non-zero (ie, the transaction itself is in the mempool), ancestorsize and ancestorfees will also be set to the appropriate values.

Synopsis

Declared in <txmempool.h>

void
GetTransactionAncestry(
    Txid const& txid,
    size_t& ancestors,
    size_t& cluster_count,
    size_t* ancestorsize = nullptr,
    CAmount* ancestorfees = nullptr) const;

Parameters

NameDescription
txidThe transaction to query.
ancestorsSet to the ancestor count (including the transaction itself).
cluster_countSet to the size of the transaction's cluster.
ancestorsizeIf non-null, set to the aggregate ancestor size.
ancestorfeesIf non-null, set to the aggregate ancestor fees.