diff --git a/src/main.cpp b/src/main.cpp index 99c3c8f31..8c0c0fcdd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2019 The Hush developers +// Copyright (c) 2019-2020 The Hush developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/main.h b/src/main.h index 33fe66bda..c4bf4ea64 100644 --- a/src/main.h +++ b/src/main.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2019 The Hush developers +// Copyright (c) 2019-2020 The Hush developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index b857ca80b..6434205b3 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -1,4 +1,5 @@ // Copyright (c) 2016 The Zcash developers +// Copyright (c) 2019-2020 The Hush developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -463,6 +464,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { } // Select Sapling notes + LogPrintf("%s: Selecting Sapling notes\n", __FUNCTION__); std::vector ops; std::vector notes; CAmount sum = 0; @@ -476,6 +478,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { } // Fetch Sapling anchor and witnesses + LogPrintf("%s: Gathering anchors and witnesses\n", __FUNCTION__); uint256 anchor; std::vector> witnesses; { @@ -492,6 +495,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { } // Add Sapling outputs + LogPrintf("%s: Adding Sapling outputs\n", __FUNCTION__); for (auto r : z_outputs_) { auto address = std::get<0>(r); auto value = std::get<1>(r); @@ -523,6 +527,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { throw JSONRPCError(RPC_WALLET_ERROR, "Failed to build transaction."); } tx_ = maybe_tx.get(); + LogPrintf("%s: Raw transaction created\n", __FUNCTION__); // Send the transaction // TODO: Use CWallet::CommitTransaction instead of sendrawtransaction @@ -530,6 +535,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { if (!testmode) { UniValue params = UniValue(UniValue::VARR); params.push_back(signedtxn); + LogPrintf("%s: Sending raw xtn\n", __FUNCTION__); UniValue sendResultValue = sendrawtransaction(params, false, CPubKey()); if (sendResultValue.isNull()) { throw JSONRPCError(RPC_WALLET_ERROR, "sendrawtransaction did not return an error or a txid."); @@ -644,7 +650,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { * taddr -> taddrs * -> zaddrs * - * Note: Consensus rule states that coinbase utxos can only be sent to a zaddr. + * Note: Consensus rule states that coinbase utxos can only be sent to a zaddr. TODO: Do they? * Local wallet rule does not allow any change when sending coinbase utxos * since there is currently no way to specify a change address and we don't * want users accidentally sending excess funds to a recipient. diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 800bbfef4..45d2e8517 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4620,7 +4620,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk) throw JSONRPCError(RPC_INVALID_PARAMETER, "Minimum number of confirmations cannot be less than 0"); } - // Fee in Zatoshis, not currency format) + // Fee in Puposhis, not currency format CAmount nFee = ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE; CAmount nDefaultFee = nFee; @@ -4653,6 +4653,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk) o.push_back(Pair("minconf", nMinDepth)); o.push_back(Pair("fee", std::stod(FormatMoney(nFee)))); UniValue contextInfo = o; + LogPrintf("%s: Building the transaction\n", __FUNCTION__); // Builder (used if Sapling addresses are involved) boost::optional builder; @@ -4672,6 +4673,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk) std::shared_ptr q = getAsyncRPCQueue(); std::shared_ptr operation( new AsyncRPCOperation_sendmany(builder, contextualTx, fromaddress, taddrRecipients, zaddrRecipients, nMinDepth, nFee, contextInfo) ); q->addOperation(operation); + LogPrintf("%s: Submitted to queue\n", __FUNCTION__); AsyncRPCOperationId operationId = operation->getId(); return operationId; }