mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-19 18:15:50 +00:00
Publish transaction due to subscribe accounts as type "transaction".
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user