MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetTransactionAncestry

Method GetTransactionAncestry

src/txmempool.cpp:1304–1314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1302}
1303
1304void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants, size_t* const ancestorsize, CAmount* const ancestorfees) const {
1305 LOCK(cs);
1306 auto it = mapTx.find(txid);
1307 ancestors = descendants = 0;
1308 if (it != mapTx.end()) {
1309 ancestors = it->GetCountWithAncestors();
1310 if (ancestorsize) *ancestorsize = it->GetSizeWithAncestors();
1311 if (ancestorfees) *ancestorfees = it->GetModFeesWithAncestors();
1312 descendants = CalculateDescendantMaximum(it);
1313 }
1314}
1315
1316bool CTxMemPool::IsLoaded() const
1317{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 5

findMethod · 0.80
GetCountWithAncestorsMethod · 0.80
endMethod · 0.45
GetSizeWithAncestorsMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64