From 1ec06e93b12c644b605cdbd8e2a808d4b2017828 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Mon, 3 Sep 2018 01:13:18 +0100 Subject: [PATCH] Rename z_inputs_ to z_sprout_inputs_ --- src/wallet/asyncrpcoperation_sendmany.cpp | 14 +++++++------- src/wallet/asyncrpcoperation_sendmany.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 52bf598f7..780b30ea1 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -246,7 +246,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { } CAmount z_inputs_total = 0; - for (SendManyInputJSOP & t : z_inputs_) { + for (SendManyInputJSOP & t : z_sprout_inputs_) { z_inputs_total += std::get<2>(t); } for (auto t : z_sapling_inputs_) { @@ -548,7 +548,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { // Copy zinputs and zoutputs to more flexible containers std::deque zInputsDeque; // zInputsDeque stores minimum numbers of notes for target amount CAmount tmp = 0; - for (auto o : z_inputs_) { + for (auto o : z_sprout_inputs_) { zInputsDeque.push_back(o); tmp += std::get<2>(o); if (tmp >= targetAmount) { @@ -563,9 +563,9 @@ bool AsyncRPCOperation_sendmany::main_impl() { // When spending notes, take a snapshot of note witnesses and anchors as the treestate will // change upon arrival of new blocks which contain joinsplit transactions. This is likely // to happen as creating a chained joinsplit transaction can take longer than the block interval. - if (z_inputs_.size() > 0) { + if (z_sprout_inputs_.size() > 0) { LOCK2(cs_main, pwalletMain->cs_wallet); - for (auto t : z_inputs_) { + for (auto t : z_sprout_inputs_) { JSOutPoint jso = std::get<0>(t); std::vector vOutPoints = { jso }; uint256 inputAnchor; @@ -1053,7 +1053,7 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() { } for (CSproutNotePlaintextEntry & entry : sproutEntries) { - z_inputs_.push_back(SendManyInputJSOP(entry.jsop, entry.plaintext.note(boost::get(frompaymentaddress_)), CAmount(entry.plaintext.value()))); + z_sprout_inputs_.push_back(SendManyInputJSOP(entry.jsop, entry.plaintext.note(boost::get(frompaymentaddress_)), CAmount(entry.plaintext.value()))); std::string data(entry.plaintext.memo().begin(), entry.plaintext.memo().end()); LogPrint("zrpcunsafe", "%s: found unspent Sprout note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s, memo=%s)\n", getId(), @@ -1076,12 +1076,12 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() { HexStr(data).substr(0, 10)); } - if (z_inputs_.empty() && z_sapling_inputs_.empty()) { + if (z_sprout_inputs_.empty() && z_sapling_inputs_.empty()) { return false; } // sort in descending order, so big notes appear first - std::sort(z_inputs_.begin(), z_inputs_.end(), [](SendManyInputJSOP i, SendManyInputJSOP j) -> bool { + std::sort(z_sprout_inputs_.begin(), z_sprout_inputs_.end(), [](SendManyInputJSOP i, SendManyInputJSOP j) -> bool { return ( std::get<2>(i) > std::get<2>(j)); }); std::sort(z_sapling_inputs_.begin(), z_sapling_inputs_.end(), diff --git a/src/wallet/asyncrpcoperation_sendmany.h b/src/wallet/asyncrpcoperation_sendmany.h index 4f62ef8b2..862ae02a2 100644 --- a/src/wallet/asyncrpcoperation_sendmany.h +++ b/src/wallet/asyncrpcoperation_sendmany.h @@ -102,7 +102,7 @@ private: std::vector t_outputs_; std::vector z_outputs_; std::vector t_inputs_; - std::vector z_inputs_; + std::vector z_sprout_inputs_; std::vector z_sapling_inputs_; TransactionBuilder builder_;