This commit is contained in:
jed
2012-11-12 17:00:11 -08:00
parent 433cbc4d92
commit c1611f3b07
3 changed files with 11 additions and 9 deletions

View File

@@ -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<TransactionMetaSet>(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<InfoSub*> notify;

View File

@@ -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<RippleAddress,bool> getAffectedAccounts(const SerializedTransaction& stTxn);
public:

View File

@@ -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;