Support * or ANY_ZADDR in z_mergetoaddress

This commit is contained in:
Duke
2023-10-30 09:31:48 -04:00
parent f0395196ec
commit 7eb9d75b94

View File

@@ -5667,8 +5667,10 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& myp
if (address == "ANY_TADDR") {
useAnyUTXO = true;
} else if (address == "ANY_SAPLING") {
} else if (address == "ANY_ZADDR" || address == "ANY_SAPLING") {
useAnySapling = true;
} else if (address == "*") {
useAnyUTXO = useAnySapling = true;
} else {
CTxDestination taddr = DecodeDestination(address);
if (IsValidDestination(taddr)) {
@@ -5692,7 +5694,7 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& myp
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify specific t-addrs when using \"ANY_TADDR\"");
}
if ((useAnySapling) && zaddrs.size() > 0) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify specific z-addrs when using \"ANY_SAPLING\"");
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify specific z-addrs when using \"ANY_SAPLING\" or \"ANY_ZADDR\"");
}
const int nextBlockHeight = chainActive.Height() + 1;