wallet: GroupOutput, remove unneeded "spendable" check
`AvailableCoins` already filters non-spendable coins.
This commit is contained in:
1 file changed
-6
@@ -415,9 +415,6 @@ FilteredOutputGroups GroupOutputs(const CWallet& wallet,
|
|||||||
// Allowing partial spends means no grouping. Each COutput gets its own OutputGroup
|
// Allowing partial spends means no grouping. Each COutput gets its own OutputGroup
|
||||||
for (const auto& [type, outputs] : coins.coins) {
|
for (const auto& [type, outputs] : coins.coins) {
|
||||||
for (const COutput& output : outputs) {
|
for (const COutput& output : outputs) {
|
||||||
// Skip outputs we cannot spend
|
|
||||||
if (!output.spendable) continue;
|
|
||||||
|
|
||||||
// Get mempool info
|
// Get mempool info
|
||||||
size_t ancestors, descendants;
|
size_t ancestors, descendants;
|
||||||
wallet.chain().getTransactionAncestry(output.outpoint.hash, ancestors, descendants);
|
wallet.chain().getTransactionAncestry(output.outpoint.hash, ancestors, descendants);
|
||||||
@@ -473,9 +470,6 @@ FilteredOutputGroups GroupOutputs(const CWallet& wallet,
|
|||||||
ScriptPubKeyToOutgroup spk_to_positive_groups_map;
|
ScriptPubKeyToOutgroup spk_to_positive_groups_map;
|
||||||
for (const auto& [type, outs] : coins.coins) {
|
for (const auto& [type, outs] : coins.coins) {
|
||||||
for (const COutput& output : outs) {
|
for (const COutput& output : outs) {
|
||||||
// Skip outputs we cannot spend
|
|
||||||
if (!output.spendable) continue;
|
|
||||||
|
|
||||||
size_t ancestors, descendants;
|
size_t ancestors, descendants;
|
||||||
wallet.chain().getTransactionAncestry(output.outpoint.hash, ancestors, descendants);
|
wallet.chain().getTransactionAncestry(output.outpoint.hash, ancestors, descendants);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user