aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-05-06 13:07:36 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-05-09 14:45:52 -0400
commit832fb114a7dfdc52fce4318cedb3eb0d78366d46 (patch)
treeb87c78f4b4cf13966dfb864027c87a6287f7184d
parente8adcf88cd36340cabef6e82dc18e712714f5081 (diff)
downloadbitcoin-832fb114a7dfdc52fce4318cedb3eb0d78366d46.tar.xz
Allow move RPC to take account balances negative
Use case: Customer owes you bitcoins, so you create a payment address associated with an account with a negative balance (the amount they owe). When customer pays, that account balance will go to zero.
-rw-r--r--src/rpc.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp
index 3aec7efbe1..379dea2944 100644
--- a/src/rpc.cpp
+++ b/src/rpc.cpp
@@ -702,21 +702,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