rpcwallet: Add TransactionBuilder argument to AsyncRPCOperation_sendmany
This commit is contained in:
parent
81e0fd2eb9
commit
36e2141d92
|
@ -970,26 +970,26 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_parameters)
|
||||||
|
|
||||||
// Test constructor of AsyncRPCOperation_sendmany
|
// Test constructor of AsyncRPCOperation_sendmany
|
||||||
try {
|
try {
|
||||||
std::shared_ptr<AsyncRPCOperation> operation(new AsyncRPCOperation_sendmany(mtx, "",{}, {}, -1));
|
std::shared_ptr<AsyncRPCOperation> operation(new AsyncRPCOperation_sendmany(boost::none, mtx, "",{}, {}, -1));
|
||||||
} catch (const UniValue& objError) {
|
} catch (const UniValue& objError) {
|
||||||
BOOST_CHECK( find_error(objError, "Minconf cannot be negative"));
|
BOOST_CHECK( find_error(objError, "Minconf cannot be negative"));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
std::shared_ptr<AsyncRPCOperation> operation(new AsyncRPCOperation_sendmany(mtx, "",{}, {}, 1));
|
std::shared_ptr<AsyncRPCOperation> operation(new AsyncRPCOperation_sendmany(boost::none, mtx, "",{}, {}, 1));
|
||||||
} catch (const UniValue& objError) {
|
} catch (const UniValue& objError) {
|
||||||
BOOST_CHECK( find_error(objError, "From address parameter missing"));
|
BOOST_CHECK( find_error(objError, "From address parameter missing"));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, "tmRr6yJonqGK23UVhrKuyvTpF8qxQQjKigJ", {}, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, "tmRr6yJonqGK23UVhrKuyvTpF8qxQQjKigJ", {}, {}, 1) );
|
||||||
} catch (const UniValue& objError) {
|
} catch (const UniValue& objError) {
|
||||||
BOOST_CHECK( find_error(objError, "No recipients"));
|
BOOST_CHECK( find_error(objError, "No recipients"));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient("dummy",1.0, "") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient("dummy",1.0, "") };
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, "INVALID", recipients, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, "INVALID", recipients, {}, 1) );
|
||||||
} catch (const UniValue& objError) {
|
} catch (const UniValue& objError) {
|
||||||
BOOST_CHECK( find_error(objError, "Invalid from address"));
|
BOOST_CHECK( find_error(objError, "Invalid from address"));
|
||||||
}
|
}
|
||||||
|
@ -997,7 +997,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_parameters)
|
||||||
// Testnet payment addresses begin with 'zt'. This test detects an incorrect prefix.
|
// Testnet payment addresses begin with 'zt'. This test detects an incorrect prefix.
|
||||||
try {
|
try {
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient("dummy",1.0, "") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient("dummy",1.0, "") };
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, "zcMuhvq8sEkHALuSU2i4NbNQxshSAYrpCExec45ZjtivYPbuiFPwk6WHy4SvsbeZ4siy1WheuRGjtaJmoD1J8bFqNXhsG6U", recipients, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, "zcMuhvq8sEkHALuSU2i4NbNQxshSAYrpCExec45ZjtivYPbuiFPwk6WHy4SvsbeZ4siy1WheuRGjtaJmoD1J8bFqNXhsG6U", recipients, {}, 1) );
|
||||||
} catch (const UniValue& objError) {
|
} catch (const UniValue& objError) {
|
||||||
BOOST_CHECK( find_error(objError, "Invalid from address"));
|
BOOST_CHECK( find_error(objError, "Invalid from address"));
|
||||||
}
|
}
|
||||||
|
@ -1006,7 +1006,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_parameters)
|
||||||
// invokes a method on pwalletMain, which is undefined in the google test environment.
|
// invokes a method on pwalletMain, which is undefined in the google test environment.
|
||||||
try {
|
try {
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient("dummy",1.0, "") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient("dummy",1.0, "") };
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, "ztjiDe569DPNbyTE6TSdJTaSDhoXEHLGvYoUnBU1wfVNU52TEyT6berYtySkd21njAeEoh8fFJUT42kua9r8EnhBaEKqCpP", recipients, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, "ztjiDe569DPNbyTE6TSdJTaSDhoXEHLGvYoUnBU1wfVNU52TEyT6berYtySkd21njAeEoh8fFJUT42kua9r8EnhBaEKqCpP", recipients, {}, 1) );
|
||||||
} catch (const UniValue& objError) {
|
} catch (const UniValue& objError) {
|
||||||
BOOST_CHECK( find_error(objError, "no spending key found for zaddr"));
|
BOOST_CHECK( find_error(objError, "no spending key found for zaddr"));
|
||||||
}
|
}
|
||||||
|
@ -1039,7 +1039,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
// there are no utxos to spend
|
// there are no utxos to spend
|
||||||
{
|
{
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1,100.0, "DEADBEEF") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1,100.0, "DEADBEEF") };
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, taddr1, {}, recipients, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, taddr1, {}, recipients, 1) );
|
||||||
operation->main();
|
operation->main();
|
||||||
BOOST_CHECK(operation->isFailed());
|
BOOST_CHECK(operation->isFailed());
|
||||||
std::string msg = operation->getErrorMessage();
|
std::string msg = operation->getErrorMessage();
|
||||||
|
@ -1050,7 +1050,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
std::vector<SendManyRecipient> recipients = {SendManyRecipient(taddr1, 100.0, "DEADBEEF")};
|
std::vector<SendManyRecipient> recipients = {SendManyRecipient(taddr1, 100.0, "DEADBEEF")};
|
||||||
std::shared_ptr<AsyncRPCOperation> operation(new AsyncRPCOperation_sendmany(mtx, zaddr1, recipients, {}, 0));
|
std::shared_ptr<AsyncRPCOperation> operation(new AsyncRPCOperation_sendmany(boost::none, mtx, zaddr1, recipients, {}, 0));
|
||||||
BOOST_CHECK(false); // Fail test if an exception is not thrown
|
BOOST_CHECK(false); // Fail test if an exception is not thrown
|
||||||
} catch (const UniValue& objError) {
|
} catch (const UniValue& objError) {
|
||||||
BOOST_CHECK(find_error(objError, "Minconf cannot be zero when sending from zaddr"));
|
BOOST_CHECK(find_error(objError, "Minconf cannot be zero when sending from zaddr"));
|
||||||
|
@ -1061,7 +1061,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
// there are no unspent notes to spend
|
// there are no unspent notes to spend
|
||||||
{
|
{
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient(taddr1,100.0, "DEADBEEF") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient(taddr1,100.0, "DEADBEEF") };
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, zaddr1, recipients, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, zaddr1, recipients, {}, 1) );
|
||||||
operation->main();
|
operation->main();
|
||||||
BOOST_CHECK(operation->isFailed());
|
BOOST_CHECK(operation->isFailed());
|
||||||
std::string msg = operation->getErrorMessage();
|
std::string msg = operation->getErrorMessage();
|
||||||
|
@ -1071,7 +1071,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
// get_memo_from_hex_string())
|
// get_memo_from_hex_string())
|
||||||
{
|
{
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1,100.0, "DEADBEEF") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1,100.0, "DEADBEEF") };
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, zaddr1, recipients, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, zaddr1, recipients, {}, 1) );
|
||||||
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
||||||
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
||||||
|
|
||||||
|
@ -1122,7 +1122,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
// add_taddr_change_output_to_tx() will append a vout to a raw transaction
|
// add_taddr_change_output_to_tx() will append a vout to a raw transaction
|
||||||
{
|
{
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1,100.0, "DEADBEEF") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1,100.0, "DEADBEEF") };
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, zaddr1, recipients, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, zaddr1, recipients, {}, 1) );
|
||||||
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
||||||
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
||||||
|
|
||||||
|
@ -1151,7 +1151,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
SendManyRecipient("tmUSbHz3vxnwLvRyNDXbwkZxjVyDodMJEhh",CAmount(4.56), ""),
|
SendManyRecipient("tmUSbHz3vxnwLvRyNDXbwkZxjVyDodMJEhh",CAmount(4.56), ""),
|
||||||
SendManyRecipient("tmYZAXYPCP56Xa5JQWWPZuK7o7bfUQW6kkd",CAmount(7.89), ""),
|
SendManyRecipient("tmYZAXYPCP56Xa5JQWWPZuK7o7bfUQW6kkd",CAmount(7.89), ""),
|
||||||
};
|
};
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, zaddr1, recipients, {}, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, zaddr1, recipients, {}, 1) );
|
||||||
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
||||||
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
||||||
|
|
||||||
|
@ -1174,7 +1174,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
// we have the spending key for the dummy recipient zaddr1
|
// we have the spending key for the dummy recipient zaddr1
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1, 0.0005, "ABCD") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1, 0.0005, "ABCD") };
|
||||||
|
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, zaddr1, {}, recipients, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, zaddr1, {}, recipients, 1) );
|
||||||
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
||||||
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
||||||
|
|
||||||
|
@ -1199,7 +1199,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||||
// Dummy input so the operation object can be instantiated.
|
// Dummy input so the operation object can be instantiated.
|
||||||
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1, 0.0005, "ABCD") };
|
std::vector<SendManyRecipient> recipients = { SendManyRecipient(zaddr1, 0.0005, "ABCD") };
|
||||||
|
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(mtx, zaddr1, {}, recipients, 1) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(boost::none, mtx, zaddr1, {}, recipients, 1) );
|
||||||
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
std::shared_ptr<AsyncRPCOperation_sendmany> ptr = std::dynamic_pointer_cast<AsyncRPCOperation_sendmany> (operation);
|
||||||
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ private:
|
||||||
boost::optional<CTxDestination> tChangeAddr;
|
boost::optional<CTxDestination> tChangeAddr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
TransactionBuilder() {}
|
||||||
TransactionBuilder(const Consensus::Params& consensusParams, int nHeight, CKeyStore* keyStore = nullptr);
|
TransactionBuilder(const Consensus::Params& consensusParams, int nHeight, CKeyStore* keyStore = nullptr);
|
||||||
|
|
||||||
void SetFee(CAmount fee);
|
void SetFee(CAmount fee);
|
||||||
|
|
|
@ -53,6 +53,7 @@ int find_output(UniValue obj, int n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
|
AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
|
||||||
|
boost::optional<TransactionBuilder> builder,
|
||||||
CMutableTransaction contextualTx,
|
CMutableTransaction contextualTx,
|
||||||
std::string fromAddress,
|
std::string fromAddress,
|
||||||
std::vector<SendManyRecipient> tOutputs,
|
std::vector<SendManyRecipient> tOutputs,
|
||||||
|
@ -75,7 +76,13 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
|
||||||
if (tOutputs.size() == 0 && zOutputs.size() == 0) {
|
if (tOutputs.size() == 0 && zOutputs.size() == 0) {
|
||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "No recipients");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "No recipients");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isUsingBuilder_ = false;
|
||||||
|
if (builder) {
|
||||||
|
isUsingBuilder_ = true;
|
||||||
|
builder_ = builder.get();
|
||||||
|
}
|
||||||
|
|
||||||
fromtaddr_ = DecodeDestination(fromAddress);
|
fromtaddr_ = DecodeDestination(fromAddress);
|
||||||
isfromtaddr_ = IsValidDestination(fromtaddr_);
|
isfromtaddr_ = IsValidDestination(fromtaddr_);
|
||||||
isfromzaddr_ = false;
|
isfromzaddr_ = false;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "asyncrpcoperation.h"
|
#include "asyncrpcoperation.h"
|
||||||
#include "amount.h"
|
#include "amount.h"
|
||||||
#include "primitives/transaction.h"
|
#include "primitives/transaction.h"
|
||||||
|
#include "transaction_builder.h"
|
||||||
#include "zcash/JoinSplit.hpp"
|
#include "zcash/JoinSplit.hpp"
|
||||||
#include "zcash/Address.hpp"
|
#include "zcash/Address.hpp"
|
||||||
#include "wallet.h"
|
#include "wallet.h"
|
||||||
|
@ -51,7 +52,15 @@ struct WitnessAnchorData {
|
||||||
|
|
||||||
class AsyncRPCOperation_sendmany : public AsyncRPCOperation {
|
class AsyncRPCOperation_sendmany : public AsyncRPCOperation {
|
||||||
public:
|
public:
|
||||||
AsyncRPCOperation_sendmany(CMutableTransaction contextualTx, std::string fromAddress, std::vector<SendManyRecipient> tOutputs, std::vector<SendManyRecipient> zOutputs, int minDepth, CAmount fee = ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE, UniValue contextInfo = NullUniValue);
|
AsyncRPCOperation_sendmany(
|
||||||
|
boost::optional<TransactionBuilder> builder,
|
||||||
|
CMutableTransaction contextualTx,
|
||||||
|
std::string fromAddress,
|
||||||
|
std::vector<SendManyRecipient> tOutputs,
|
||||||
|
std::vector<SendManyRecipient> zOutputs,
|
||||||
|
int minDepth,
|
||||||
|
CAmount fee = ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE,
|
||||||
|
UniValue contextInfo = NullUniValue);
|
||||||
virtual ~AsyncRPCOperation_sendmany();
|
virtual ~AsyncRPCOperation_sendmany();
|
||||||
|
|
||||||
// We don't want to be copied or moved around
|
// We don't want to be copied or moved around
|
||||||
|
@ -73,6 +82,7 @@ private:
|
||||||
|
|
||||||
UniValue contextinfo_; // optional data to include in return value from getStatus()
|
UniValue contextinfo_; // optional data to include in return value from getStatus()
|
||||||
|
|
||||||
|
bool isUsingBuilder_; // Indicates that no Sprout addresses are involved
|
||||||
uint32_t consensusBranchId_;
|
uint32_t consensusBranchId_;
|
||||||
CAmount fee_;
|
CAmount fee_;
|
||||||
int mindepth_;
|
int mindepth_;
|
||||||
|
@ -93,7 +103,8 @@ private:
|
||||||
std::vector<SendManyRecipient> z_outputs_;
|
std::vector<SendManyRecipient> z_outputs_;
|
||||||
std::vector<SendManyInputUTXO> t_inputs_;
|
std::vector<SendManyInputUTXO> t_inputs_;
|
||||||
std::vector<SendManyInputJSOP> z_inputs_;
|
std::vector<SendManyInputJSOP> z_inputs_;
|
||||||
|
|
||||||
|
TransactionBuilder builder_;
|
||||||
CTransaction tx_;
|
CTransaction tx_;
|
||||||
|
|
||||||
void add_taddr_change_output_to_tx(CAmount amount);
|
void add_taddr_change_output_to_tx(CAmount amount);
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "netbase.h"
|
#include "netbase.h"
|
||||||
#include "rpc/server.h"
|
#include "rpc/server.h"
|
||||||
#include "timedata.h"
|
#include "timedata.h"
|
||||||
|
#include "transaction_builder.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "utilmoneystr.h"
|
#include "utilmoneystr.h"
|
||||||
#include "wallet.h"
|
#include "wallet.h"
|
||||||
|
@ -3787,7 +3788,14 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
||||||
o.push_back(Pair("fee", std::stod(FormatMoney(nFee))));
|
o.push_back(Pair("fee", std::stod(FormatMoney(nFee))));
|
||||||
UniValue contextInfo = o;
|
UniValue contextInfo = o;
|
||||||
|
|
||||||
|
// Builder (used if Sapling addresses are involved)
|
||||||
|
boost::optional<TransactionBuilder> builder;
|
||||||
|
if (false) { // TODO: Sapling support
|
||||||
|
builder = TransactionBuilder(Params().GetConsensus(), nextBlockHeight, pwalletMain);
|
||||||
|
}
|
||||||
|
|
||||||
// Contextual transaction we will build on
|
// Contextual transaction we will build on
|
||||||
|
// (used if no Sapling addresses are involved)
|
||||||
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), nextBlockHeight);
|
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), nextBlockHeight);
|
||||||
bool isShielded = !fromTaddr || zaddrRecipients.size() > 0;
|
bool isShielded = !fromTaddr || zaddrRecipients.size() > 0;
|
||||||
if (contextualTx.nVersion == 1 && isShielded) {
|
if (contextualTx.nVersion == 1 && isShielded) {
|
||||||
|
@ -3796,7 +3804,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
||||||
|
|
||||||
// Create operation and add to global queue
|
// Create operation and add to global queue
|
||||||
std::shared_ptr<AsyncRPCQueue> q = getAsyncRPCQueue();
|
std::shared_ptr<AsyncRPCQueue> q = getAsyncRPCQueue();
|
||||||
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(contextualTx, fromaddress, taddrRecipients, zaddrRecipients, nMinDepth, nFee, contextInfo) );
|
std::shared_ptr<AsyncRPCOperation> operation( new AsyncRPCOperation_sendmany(builder, contextualTx, fromaddress, taddrRecipients, zaddrRecipients, nMinDepth, nFee, contextInfo) );
|
||||||
q->addOperation(operation);
|
q->addOperation(operation);
|
||||||
AsyncRPCOperationId operationId = operation->getId();
|
AsyncRPCOperationId operationId = operation->getId();
|
||||||
return operationId;
|
return operationId;
|
||||||
|
|
Loading…
Reference in New Issue