Skip to content

Commit

Permalink
Rename mInLedger to mLedgerIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronek committed Oct 30, 2023
1 parent c477eb4 commit c81bece
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/ripple/app/misc/Transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
LedgerIndex
getLedger() const
{
return mInLedger;
return mLedgerIndex;
}

bool
isValidated() const
{
return mInLedger != 0;
return mLedgerIndex != 0;
}

TransStatus
Expand Down Expand Up @@ -138,7 +138,7 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
void
setLedger(LedgerIndex ledger)
{
mInLedger = ledger;
mLedgerIndex = ledger;
}

/**
Expand Down Expand Up @@ -391,7 +391,7 @@ class Transaction : public std::enable_shared_from_this<Transaction>,

uint256 mTransactionID;

LedgerIndex mInLedger = 0;
LedgerIndex mLedgerIndex = 0;
TransStatus mStatus = INVALID;
TER mResult = temUNCERTAIN;
bool mApplying = false;
Expand Down
10 changes: 5 additions & 5 deletions src/ripple/app/misc/impl/Transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void
Transaction::setStatus(TransStatus ts, std::uint32_t lseq)
{
mStatus = ts;
mInLedger = lseq;
mLedgerIndex = lseq;
}

TransStatus
Expand Down Expand Up @@ -173,16 +173,16 @@ Transaction::getJson(
{
Json::Value ret(mTransaction->getJson(JsonOptions::none, binary, hash));

if (mInLedger)
if (mLedgerIndex)
{
if (showInLedger)
ret[jss::inLedger] = mInLedger; // Deprecated.
ret[jss::inLedger] = mLedgerIndex; // Deprecated.

ret[jss::ledger_index] = mInLedger;
ret[jss::ledger_index] = mLedgerIndex;

if (options == JsonOptions::include_date)
{
auto ct = mApp.getLedgerMaster().getCloseTimeBySeq(mInLedger);
auto ct = mApp.getLedgerMaster().getCloseTimeBySeq(mLedgerIndex);
if (ct)
ret[jss::date] = ct->time_since_epoch().count();
}
Expand Down

0 comments on commit c81bece

Please sign in to comment.