From 66bac37186273817ca4972562a07ec87249eb055 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Fri, 21 Dec 2018 00:00:11 +0800 Subject: [PATCH] fixed --- src/wallet/rpcwallet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 5985a63c2..07761f339 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4891,7 +4891,6 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp) } utxoCounter++; - CAmount nValue = out.tx->vout[out.i].nValue; if (!maxedOutUTXOsFlag) { size_t increase = (boost::get(&address) != nullptr) ? CTXIN_SPEND_P2SH_SIZE : CTXIN_SPEND_DUST_SIZE; if (estimatedTxSize + increase >= max_tx_size || @@ -4938,7 +4937,7 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp) // Find unspent notes and update estimated size for (const CSproutNotePlaintextEntry& entry : sproutEntries) { noteCounter++; - nValue = entry.plaintext.value(); + CAmount nValue = entry.plaintext.value(); if (!maxedOutNotesFlag) { // If we haven't added any notes yet and the merge is to a @@ -4965,7 +4964,7 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp) for (const SaplingNoteEntry& entry : saplingEntries) { noteCounter++; - nValue = entry.note.value(); + CAmount nValue = entry.note.value(); if (!maxedOutNotesFlag) { size_t increase = SPENDDESCRIPTION_SIZE; if (estimatedTxSize + increase >= max_tx_size ||