| 1071 | } |
| 1072 | |
| 1073 | void 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 | |
| 1083 | SaltedTxidHasher::SaltedTxidHasher() : k0(GetRand(std::numeric_limits<uint64_t>::max())), k1(GetRand(std::numeric_limits<uint64_t>::max())) {} |