No use wasting memory to keep track of the set of all addresses and never use it

This commit is contained in:
Duke
2025-05-17 23:28:31 -04:00
parent e748772fff
commit 604d77fcd9

View File

@@ -5146,9 +5146,6 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
}
}
// Keep track of addresses to spot duplicates
set<std::string> setAddress;
// Recipients
std::vector<SendManyRecipient> taddrRecipients;
std::vector<SendManyRecipient> zaddrRecipients;
@@ -5186,11 +5183,6 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
// throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Extreme Privacy! You must send to a zaddr");
//}
// Allowing duplicate receivers helps various HushList protocol operations
//if (setAddress.count(address))
// throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+address);
setAddress.insert(address);
UniValue this_opret = find_value(o, "opreturn");
if (!this_opret.isNull()) {
opretValue = this_opret;