diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2011-05-12 14:46:13 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@exmulti.com> | 2011-05-12 14:46:13 -0700 |
commit | efe06e1efde6daf1ce1338ed39bd4b50acd29312 (patch) | |
tree | 357885e1b40fa328059a3ff53ed846d41327845e | |
parent | 73eb306cfd2fdc163e12a15abd496986436fcb07 (diff) | |
parent | 832fb114a7dfdc52fce4318cedb3eb0d78366d46 (diff) |
Merge pull request #215 from gavinandresen/negativemove
Allow move RPC to take account balances negative
-rw-r--r-- | src/rpc.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp index 8af659e2ac..df5f123233 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -718,21 +718,6 @@ Value movecmd(const Array& params, bool fHelp) 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 |