mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Santize locally submited transactions.
This commit is contained in:
@@ -44,6 +44,24 @@ uint32 NetworkOPs::getCurrentLedgerID()
|
||||
return mLedgerMaster->getCurrentLedger()->getLedgerSeq();
|
||||
}
|
||||
|
||||
// Sterilize transaction through serialization.
|
||||
void NetworkOPs::submitTransaction(Transaction::pointer tpTrans)
|
||||
{
|
||||
Serializer s;
|
||||
|
||||
tpTrans->getSTransaction()->add(s);
|
||||
|
||||
std::vector<unsigned char> vucTransaction = s.getData();
|
||||
|
||||
SerializerIterator sit(s);
|
||||
|
||||
Transaction::pointer tpTransNew = Transaction::sharedTransaction(s.getData(), true);
|
||||
|
||||
assert(tpTransNew);
|
||||
|
||||
(void) NetworkOPs::processTransaction(tpTransNew);
|
||||
}
|
||||
|
||||
Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans, uint32 tgtLedger, Peer* source)
|
||||
{
|
||||
Transaction::pointer dbtx = theApp->getMasterTransaction().fetch(trans->getID(), true);
|
||||
|
||||
Reference in New Issue
Block a user