Mercurial > hg > bitcoin
changeset 590:d0dcb95f5d36 draft
Merge pull request #215 from gavinandresen/negativemove
Allow move RPC to take account balances negative
author | Jeff Garzik <jgarzik@exmulti.com> |
---|---|
date | Thu, 12 May 2011 14:46:13 -0700 |
parents | 7fcd1347bd3f (current diff) a1db9789c0bd (diff) |
children | 42d423fe3589 0e700b672eb6 f00556032bc4 |
files | src/rpc.cpp |
diffstat | 1 files changed, 0 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -718,21 +718,6 @@ CWalletDB walletdb; walletdb.TxnBegin(); - // Check funds - if (!strFrom.empty()) - { - int64 nBalance = GetAccountBalance(walletdb, strFrom, nMinDepth); - if (nAmount > nBalance) - throw JSONRPCError(-6, "Account has insufficient funds"); - } - else - { - // move from "" account special case - int64 nBalance = GetAccountBalance(walletdb, strTo, nMinDepth); - if (nAmount > GetBalance() - nBalance) - throw JSONRPCError(-6, "Account has insufficient funds"); - } - int64 nNow = GetAdjustedTime(); // Debit