File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,10 @@ class ChainImpl : public Chain
196
196
auto it_mp = ::mempool.mapTx .find (txid);
197
197
return it_mp != ::mempool.mapTx .end () && it_mp->GetCountWithDescendants () > 1 ;
198
198
}
199
+ void getTransactionAncestry (const uint256& txid, size_t & ancestors, size_t & descendants) override
200
+ {
201
+ ::mempool.GetTransactionAncestry (txid, ancestors, descendants);
202
+ }
199
203
};
200
204
201
205
} // namespace
Original file line number Diff line number Diff line change 9
9
#include < policy/rbf.h> // For RBFTransactionState
10
10
11
11
#include < memory>
12
+ #include < stddef.h>
12
13
#include < stdint.h>
13
14
#include < string>
14
15
#include < vector>
@@ -138,6 +139,9 @@ class Chain
138
139
139
140
// ! Check if transaction has descendants in mempool.
140
141
virtual bool hasDescendantsInMempool (const uint256& txid) = 0;
142
+
143
+ // ! Calculate mempool ancestor and descendant counts for the given transaction.
144
+ virtual void getTransactionAncestry (const uint256& txid, size_t & ancestors, size_t & descendants) = 0;
141
145
};
142
146
143
147
// ! Interface to let node manage chain clients (wallets, or maybe tools for
Original file line number Diff line number Diff line change @@ -4528,7 +4528,7 @@ std::vector<OutputGroup> CWallet::GroupOutputs(const std::vector<COutput>& outpu
4528
4528
CInputCoin input_coin = output.GetInputCoin ();
4529
4529
4530
4530
size_t ancestors, descendants;
4531
- mempool. GetTransactionAncestry (output.tx ->GetHash (), ancestors, descendants);
4531
+ chain (). getTransactionAncestry (output.tx ->GetHash (), ancestors, descendants);
4532
4532
if (!single_coin && ExtractDestination (output.tx ->tx ->vout [output.i ].scriptPubKey , dst)) {
4533
4533
// Limit output groups to no more than 10 entries, to protect
4534
4534
// against inadvertently creating a too-large transaction
You can’t perform that action at this time.
0 commit comments