Publish transaction due to subscribe accounts as type "transaction".

This commit is contained in:
Arthur Britto
2013-03-04 19:24:20 -08:00
parent 93f79ca204
commit 3a8d85d9c4
3 changed files with 8 additions and 8 deletions

View File

@@ -1291,7 +1291,7 @@ Json::Value NetworkOPs::pubBootstrapAccountInfo(Ledger::ref lpAccepted, const Ri
void NetworkOPs::pubProposedTransaction(Ledger::ref lpCurrent, SerializedTransaction::ref stTxn, TER terResult)
{
Json::Value jvObj = transJson(*stTxn, terResult, false, lpCurrent, "transaction");
Json::Value jvObj = transJson(*stTxn, terResult, false, lpCurrent);
{
boost::recursive_mutex::scoped_lock sl(mMonitorLock);
@@ -1375,7 +1375,7 @@ void NetworkOPs::reportFeeChange()
theApp->getJobQueue().addJob(jtCLIENT, "reportFeeChange->pubServer", boost::bind(&NetworkOPs::pubServer, this));
}
Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent, const std::string& strType)
Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent)
{
Json::Value jvObj(Json::objectValue);
std::string sToken;
@@ -1383,7 +1383,7 @@ Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terRes
transResultInfo(terResult, sToken, sHuman);
jvObj["type"] = strType;
jvObj["type"] = "transaction";
jvObj["transaction"] = stTxn.getJson(0);
if (bAccepted) {
jvObj["ledger_index"] = lpCurrent->getLedgerSeq();
@@ -1404,7 +1404,7 @@ Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terRes
void NetworkOPs::pubAcceptedTransaction(Ledger::ref alAccepted, const ALTransaction& alTx)
{
Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), true, alAccepted, "transaction");
Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), true, alAccepted);
jvObj["meta"] = alTx.getMeta()->getJson(0);
{
@@ -1503,7 +1503,7 @@ void NetworkOPs::pubAccountTransaction(Ledger::ref lpCurrent, const ALTransactio
if (!notify.empty())
{
Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), bAccepted, lpCurrent, "account");
Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), bAccepted, lpCurrent);
if (alTx.isApplied())
jvObj["meta"] = alTx.getMeta()->getJson(0);

View File

@@ -136,7 +136,7 @@ protected:
void setMode(OperatingMode);
Json::Value transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent, const std::string& strType);
Json::Value transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent);
bool haveConsensusObject();
Json::Value pubBootstrapAccountInfo(Ledger::ref lpAccepted, const RippleAddress& naAccountID);

View File

@@ -719,7 +719,7 @@ buster.testCase("Gateway", {
});
self.remote
.on('account', function (m) {
.on('transaction', function (m) {
// console.log("ACCOUNT: %s", JSON.stringify(m));
self.found = 1;
})
@@ -857,7 +857,7 @@ buster.testCase("Gateway", {
});
self.remote
.on('account', function (m) {
.on('transaction', function (m) {
// console.log("ACCOUNT: %s", JSON.stringify(m));
self.found = 1;
})