MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetTransactionAncestry

Method GetTransactionAncestry

src/txmempool.cpp:943–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

941}
942
943void CTxMemPool::GetTransactionAncestry(const Txid& txid, size_t& ancestors, size_t& cluster_count, size_t* const ancestorsize, CAmount* const ancestorfees) const {
944 LOCK(cs);
945 auto it = mapTx.find(txid);
946 ancestors = cluster_count = 0;
947 if (it != mapTx.end()) {
948 auto [ancestor_count, ancestor_size, ancestor_fees] = CalculateAncestorData(*it);
949 ancestors = ancestor_count;
950 if (ancestorsize) *ancestorsize = ancestor_size;
951 if (ancestorfees) *ancestorfees = ancestor_fees;
952 cluster_count = m_txgraph->GetCluster(*it, TxGraph::Level::MAIN).size();
953 }
954}
955
956bool CTxMemPool::GetLoadTried() const
957{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 4

findMethod · 0.80
GetClusterMethod · 0.80
endMethod · 0.45
sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64