Improvements for WS account_transaction_subscribe.

This commit is contained in:
Arthur Britto
2012-06-29 17:51:37 -07:00
parent 5a6349b328
commit dacbc58ef3
3 changed files with 117 additions and 42 deletions

View File

@@ -818,11 +818,19 @@ void NetworkOPs::pubTransaction(const Ledger::pointer& lpCurrent, const Serializ
}
Json::Value jvObj(Json::objectValue);
std::string strToken;
std::string strHuman;
jvObj["type"] = "accountTransactionProposed";
transResultInfo(terResult, strToken, strHuman);
jvObj["type"] = "accountTransaction";
jvObj["seq"] = lpCurrent->getLedgerSeq();
jvObj["accounts"] = jvAccounts;
jvObj["transaction"] = stTxn.getJson(0);
jvObj["status"] = "proposed";
jvObj["result"] = strToken;
jvObj["result_message"] = strHuman;
jvObj["result_code"] = terResult;
BOOST_FOREACH(InfoSub* ispListener, usisNotify)
{