Handle all the weird edge cases, such as:

A remote transaction is received *from* a local account. We neeed
to update our balance and sequence tracking.
A local transaction loses to a conflict.
This commit is contained in:
JoelKatz
2012-01-18 15:33:58 -08:00
parent 60dcb8ac35
commit 94e4e1d04b
6 changed files with 66 additions and 7 deletions

View File

@@ -365,7 +365,7 @@ Json::Value RPCServer::doSendTo(Json::Value& params)
LocalTransaction::pointer lt(new LocalTransaction(destAccount, iAmount, iTag));
if(!lt->makeTransaction())
return JSONRPCError(500, "Insufficient funds in unlocked accounts");
lt->applyTransaction();
lt->performTransaction();
return lt->getTransaction()->getJson(true);
}