mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Cleanup/debug.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
|
||||
#include "json/writer.h"
|
||||
|
||||
#include "LocalTransaction.h"
|
||||
#include "Application.h"
|
||||
#include "Wallet.h"
|
||||
@@ -8,10 +10,24 @@ bool LocalTransaction::makeTransaction()
|
||||
if(!!mTransaction) return true;
|
||||
|
||||
LocalAccount::pointer lac(theApp->getWallet().findAccountForTransaction(mAmount));
|
||||
if(!lac) return false;
|
||||
if(!lac)
|
||||
{
|
||||
std::cerr << "Account with sufficient balance not found" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
mTransaction=Transaction::pointer(new Transaction(lac, mDestAcctID, mAmount, mTag,
|
||||
theApp->getOPs().getCurrentLedgerID()));
|
||||
if(mTransaction->getStatus()!=NEW) return false;
|
||||
if(mTransaction->getStatus()!=NEW)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::cerr << "Status not NEW" << std::endl;
|
||||
Json::Value t=mTransaction->getJson(true);
|
||||
Json::StyledStreamWriter w;
|
||||
w.write(std::cerr, t);
|
||||
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user