We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 222e627 commit 57ec1c9Copy full SHA for 57ec1c9
src/wallet/wallet.cpp
@@ -4423,7 +4423,10 @@ std::vector<OutputGroup> CWallet::GroupOutputs(const std::vector<COutput>& outpu
4423
size_t ancestors, descendants;
4424
mempool.GetTransactionAncestry(output.tx->GetHash(), ancestors, descendants);
4425
if (!single_coin && ExtractDestination(output.tx->tx->vout[output.i].scriptPubKey, dst)) {
4426
- if (gmap.count(dst) == 10) {
+ // Limit output groups to no more than 10 entries, to protect
4427
+ // against inadvertently creating a too-large transaction
4428
+ // when using -avoidpartialspends
4429
+ if (gmap[dst].m_outputs.size() >= 10) {
4430
groups.push_back(gmap[dst]);
4431
gmap.erase(dst);
4432
}
0 commit comments