diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-05 12:47:23 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-05 12:47:31 +0100 |
commit | c01f16aaa0edd5d062ea0f987ad0bb1d49891b0f (patch) | |
tree | f6513c3b74fa454449d7b3cc94a1b5e2915387c2 | |
parent | 43e8150ef69093c906c4406ce58c1fd21fee898e (diff) | |
parent | ea83d0098a2eb29a3b1398f3ecf907f7eece1eee (diff) |
Merge #9165: SendMoney: use already-calculated balance
ea83d00 SendMoney: use already-calculated balance (instagibbs)
-rw-r--r-- | src/wallet/rpcwallet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 9e32b6751d..d4e21b542d 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -362,7 +362,7 @@ static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtr CRecipient recipient = {scriptPubKey, nValue, fSubtractFeeFromAmount}; vecSend.push_back(recipient); if (!pwalletMain->CreateTransaction(vecSend, wtxNew, reservekey, nFeeRequired, nChangePosRet, strError)) { - if (!fSubtractFeeFromAmount && nValue + nFeeRequired > pwalletMain->GetBalance()) + if (!fSubtractFeeFromAmount && nValue + nFeeRequired > curBalance) strError = strprintf("Error: This transaction requires a transaction fee of at least %s", FormatMoney(nFeeRequired)); throw JSONRPCError(RPC_WALLET_ERROR, strError); } |