mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Reformatting using AStyle
This commit is contained in:
@@ -1,53 +1,55 @@
|
||||
AcceptedLedgerTx::AcceptedLedgerTx(uint32 seq, SerializerIterator& sit)
|
||||
AcceptedLedgerTx::AcceptedLedgerTx (uint32 seq, SerializerIterator& sit)
|
||||
{
|
||||
Serializer txnSer(sit.getVL());
|
||||
SerializerIterator txnIt(txnSer);
|
||||
Serializer txnSer (sit.getVL ());
|
||||
SerializerIterator txnIt (txnSer);
|
||||
|
||||
mTxn = boost::make_shared<SerializedTransaction>(boost::ref(txnIt));
|
||||
mRawMeta= sit.getVL();
|
||||
mMeta = boost::make_shared<TransactionMetaSet>(mTxn->getTransactionID(), seq, mRawMeta);
|
||||
mAffected = mMeta->getAffectedAccounts();
|
||||
mResult = mMeta->getResultTER();
|
||||
buildJson();
|
||||
mTxn = boost::make_shared<SerializedTransaction> (boost::ref (txnIt));
|
||||
mRawMeta = sit.getVL ();
|
||||
mMeta = boost::make_shared<TransactionMetaSet> (mTxn->getTransactionID (), seq, mRawMeta);
|
||||
mAffected = mMeta->getAffectedAccounts ();
|
||||
mResult = mMeta->getResultTER ();
|
||||
buildJson ();
|
||||
}
|
||||
|
||||
AcceptedLedgerTx::AcceptedLedgerTx(SerializedTransaction::ref txn, TransactionMetaSet::ref met) :
|
||||
mTxn(txn), mMeta(met), mAffected(met->getAffectedAccounts())
|
||||
AcceptedLedgerTx::AcceptedLedgerTx (SerializedTransaction::ref txn, TransactionMetaSet::ref met) :
|
||||
mTxn (txn), mMeta (met), mAffected (met->getAffectedAccounts ())
|
||||
{
|
||||
mResult = mMeta->getResultTER();
|
||||
buildJson();
|
||||
mResult = mMeta->getResultTER ();
|
||||
buildJson ();
|
||||
}
|
||||
|
||||
AcceptedLedgerTx::AcceptedLedgerTx(SerializedTransaction::ref txn, TER result) :
|
||||
mTxn(txn), mResult(result), mAffected(txn->getMentionedAccounts())
|
||||
AcceptedLedgerTx::AcceptedLedgerTx (SerializedTransaction::ref txn, TER result) :
|
||||
mTxn (txn), mResult (result), mAffected (txn->getMentionedAccounts ())
|
||||
{
|
||||
buildJson();
|
||||
buildJson ();
|
||||
}
|
||||
|
||||
std::string AcceptedLedgerTx::getEscMeta() const
|
||||
std::string AcceptedLedgerTx::getEscMeta () const
|
||||
{
|
||||
assert(!mRawMeta.empty());
|
||||
return sqlEscape(mRawMeta);
|
||||
assert (!mRawMeta.empty ());
|
||||
return sqlEscape (mRawMeta);
|
||||
}
|
||||
|
||||
void AcceptedLedgerTx::buildJson()
|
||||
void AcceptedLedgerTx::buildJson ()
|
||||
{
|
||||
mJson = Json::objectValue;
|
||||
mJson["transaction"] = mTxn->getJson(0);
|
||||
if (mMeta)
|
||||
{
|
||||
mJson["meta"] = mMeta->getJson(0);
|
||||
mJson["raw_meta"] = strHex(mRawMeta);
|
||||
}
|
||||
mJson["result"] = transHuman(mResult);
|
||||
mJson = Json::objectValue;
|
||||
mJson["transaction"] = mTxn->getJson (0);
|
||||
|
||||
if (!mAffected.empty())
|
||||
{
|
||||
Json::Value& affected = (mJson["affected"] = Json::arrayValue);
|
||||
BOOST_FOREACH(const RippleAddress& ra, mAffected)
|
||||
{
|
||||
affected.append(ra.humanAccountID());
|
||||
}
|
||||
}
|
||||
if (mMeta)
|
||||
{
|
||||
mJson["meta"] = mMeta->getJson (0);
|
||||
mJson["raw_meta"] = strHex (mRawMeta);
|
||||
}
|
||||
|
||||
mJson["result"] = transHuman (mResult);
|
||||
|
||||
if (!mAffected.empty ())
|
||||
{
|
||||
Json::Value& affected = (mJson["affected"] = Json::arrayValue);
|
||||
BOOST_FOREACH (const RippleAddress & ra, mAffected)
|
||||
{
|
||||
affected.append (ra.humanAccountID ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user