]> Git Repo - VerusCoin.git/commitdiff
Partial revert & fix for commit 9e84b5a ; code block in wrong location.
authorSimon <[email protected]>
Tue, 20 Jun 2017 04:11:34 +0000 (21:11 -0700)
committerSimon <[email protected]>
Tue, 20 Jun 2017 04:11:34 +0000 (21:11 -0700)
src/wallet/asyncrpcoperation_sendmany.cpp

index 3bbbfcc05aa71bace7944fcd178910f20037d4e6..df48fb772b64aa9cffa9cba28625600466677a60 100644 (file)
@@ -204,17 +204,6 @@ bool AsyncRPCOperation_sendmany::main_impl() {
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds, no unspent notes found for zaddr from address.");
     }
 
-    // Check mempooltxinputlimit to avoid creating a transaction which the local mempool rejects
-    if (isfromtaddr_) {
-        size_t limit = (size_t)GetArg("-mempooltxinputlimit", 0);
-        if (limit > 0) {
-            size_t n = t_inputs_.size();
-            if (n > limit) {
-                throw JSONRPCError(RPC_WALLET_ERROR, strprintf("Too many transparent inputs %zu > limit %zu", n, limit));
-            }
-        }
-    }
-
     CAmount t_inputs_total = 0;
     for (SendManyInputUTXO & t : t_inputs_) {
         t_inputs_total += std::get<2>(t);
@@ -292,6 +281,15 @@ bool AsyncRPCOperation_sendmany::main_impl() {
         t_inputs_ = selectedTInputs;
         t_inputs_total = selectedUTXOAmount;
 
+        // Check mempooltxinputlimit to avoid creating a transaction which the local mempool rejects
+        size_t limit = (size_t)GetArg("-mempooltxinputlimit", 0);
+        if (limit > 0) {
+            size_t n = t_inputs_.size();
+            if (n > limit) {
+                throw JSONRPCError(RPC_WALLET_ERROR, strprintf("Too many transparent inputs %zu > limit %zu", n, limit));
+            }
+        }
+
         // update the transaction with these inputs
         CMutableTransaction rawTx(tx_);
         for (SendManyInputUTXO & t : t_inputs_) {
This page took 0.027224 seconds and 4 git commands to generate.