diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index 8c81e74113..b3006f7a5c 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -1007,7 +1007,7 @@ void NetworkOPs::pubProposedTransaction(Ledger::ref lpCurrent, const SerializedT } } - pubAccountTransaction(lpCurrent,stTxn,terResult,false); + pubAccountTransaction(lpCurrent,stTxn,terResult,false,TransactionMetaSet::pointer()); } void NetworkOPs::pubLedger(Ledger::ref lpAccepted) @@ -1051,7 +1051,10 @@ void NetworkOPs::pubLedger(Ledger::ref lpAccepted) // XXX Need to give failures too. TER terResult = tesSUCCESS; - pubAcceptedTransaction(lpAccepted, *stTxn, terResult); + SerializerIterator it(item->peekSerializer()); + + TransactionMetaSet::pointer meta = boost::make_shared(stTxn->getTransactionID(), lpAccepted->getLedgerSeq(), it.getVL()); + pubAcceptedTransaction(lpAccepted, *stTxn, terResult,meta); } } } @@ -1084,7 +1087,7 @@ Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terRes return jvObj; } -void NetworkOPs::pubAcceptedTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult) +void NetworkOPs::pubAcceptedTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult,TransactionMetaSet::pointer& meta) { Json::Value jvObj = transJson(stTxn, terResult, true, lpCurrent, "transaction"); @@ -1101,11 +1104,11 @@ void NetworkOPs::pubAcceptedTransaction(Ledger::ref lpCurrent, const SerializedT } } - pubAccountTransaction(lpCurrent,stTxn,terResult,true); + pubAccountTransaction(lpCurrent,stTxn,terResult,true,meta); } -void NetworkOPs::pubAccountTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult, bool bAccepted) +void NetworkOPs::pubAccountTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult, bool bAccepted,TransactionMetaSet::pointer& meta) { boost::unordered_set notify; diff --git a/src/cpp/ripple/NetworkOPs.h b/src/cpp/ripple/NetworkOPs.h index bf5be14e2c..6d06250cf0 100644 --- a/src/cpp/ripple/NetworkOPs.h +++ b/src/cpp/ripple/NetworkOPs.h @@ -105,8 +105,8 @@ protected: Json::Value pubBootstrapAccountInfo(Ledger::ref lpAccepted, const RippleAddress& naAccountID); - void pubAcceptedTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult); - void pubAccountTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult,bool accepted); + void pubAcceptedTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult,TransactionMetaSet::pointer& meta); + void pubAccountTransaction(Ledger::ref lpCurrent, const SerializedTransaction& stTxn, TER terResult,bool accepted,TransactionMetaSet::pointer& meta); std::map getAffectedAccounts(const SerializedTransaction& stTxn); public: diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index 3102eb408f..d46da78ccc 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -742,9 +742,8 @@ Json::Value RPCHandler::handleJSONSubmit(const Json::Value& jvRequest) AccountState::pointer asSrc = mNetOps->getAccountState(uint256(0), srcAddress); - if( txJSON["type"]=="Payment") + if( txJSON["TransactionType"]=="Payment") { - txJSON["TransactionType"]=0; RippleAddress dstAccountID;