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

Method GetTransactionAncestry

src/txmempool.cpp:1073–1081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1071}
1072
1073void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) const {
1074 LOCK(cs);
1075 auto it = mapTx.find(txid);
1076 ancestors = descendants = 0;
1077 if (it != mapTx.end()) {
1078 ancestors = it->GetCountWithAncestors();
1079 descendants = CalculateDescendantMaximum(it);
1080 }
1081}
1082
1083SaltedTxidHasher::SaltedTxidHasher() : k0(GetRand(std::numeric_limits<uint64_t>::max())), k1(GetRand(std::numeric_limits<uint64_t>::max())) {}

Callers 2

GroupOutputsMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 3

GetCountWithAncestorsMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64