diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2019-10-18 04:02:50 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2021-08-01 23:38:47 +0000 |
commit | 3f77dfdaf0f0bfe0c4662a616d6943f31bdd5bf4 (patch) | |
tree | a2e4fab1809e89366d2355404229a384514c2303 /src/txmempool.cpp | |
parent | 42af9596ce85a541988abee54eed8a9b271a46a1 (diff) | |
download | bitcoin-3f77dfdaf0f0bfe0c4662a616d6943f31bdd5bf4.tar.xz |
Expose ancestorsize and ancestorfees via getTransactionAncestry
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index c5a4bbf1b0..93ad353127 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1116,12 +1116,14 @@ uint64_t CTxMemPool::CalculateDescendantMaximum(txiter entry) const { return maximum; } -void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) const { +void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants, size_t* const ancestorsize, CAmount* const ancestorfees) const { LOCK(cs); auto it = mapTx.find(txid); ancestors = descendants = 0; if (it != mapTx.end()) { ancestors = it->GetCountWithAncestors(); + if (ancestorsize) *ancestorsize = it->GetSizeWithAncestors(); + if (ancestorfees) *ancestorfees = it->GetModFeesWithAncestors(); descendants = CalculateDescendantMaximum(it); } } |