Browse Source

Remove z_sendmany restriction on duplicate addresses

This is from https://github.com/zcash/zcash/issues/2955

and will potentially allow HushList protocol to send
up to 512*54 = 27KB of memo data to a single address without
requiring a multipart protocol. This is possible because
all memos will share the same txid and can be uniquely identified
and ordered by their transaction output index.
zsendmany_duplicates
Jonathan "Duke" Leto 6 years ago
parent
commit
f88cf47ff0
  1. 9
      src/wallet/rpcwallet.cpp

9
src/wallet/rpcwallet.cpp

@ -1,6 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2017 The Hush developers
// Copyright (c) 2017-2018 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -3376,9 +3376,6 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
if (outputs.size()==0)
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, amounts array is empty.");
// Keep track of addresses to spot duplicates
set<std::string> setAddress;
// Recipients
std::vector<SendManyRecipient> taddrRecipients;
std::vector<SendManyRecipient> zaddrRecipients;
@ -3408,10 +3405,6 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
}
}
if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+address);
setAddress.insert(address);
UniValue memoValue = find_value(o, "memo");
string memo;
if (!memoValue.isNull()) {

Loading…
Cancel
Save