Skip to content

Commit

Permalink
formatting police
Browse files Browse the repository at this point in the history
  • Loading branch information
marta-lokhova committed Jul 19, 2023
1 parent a632219 commit e019135
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/herder/TxSetFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ TxSetFrame::checkValid(Application& app, uint64_t lowerBoundCloseTimeOffset,
hexAbbrev(mPreviousLedgerHash), *fee);
return false;
}
if (tx->getInclusionFee() < getMinInclusionFee(*tx, lcl.header, fee))
if (tx->getInclusionFee() <
getMinInclusionFee(*tx, lcl.header, fee))
{
CLOG_DEBUG(
Herder,
Expand Down
6 changes: 4 additions & 2 deletions src/transactions/FeeBumpTransactionFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,14 @@ FeeBumpTransactionFrame::commonValidPreSeqNum(AbstractLedgerTxn& ltx)
}

auto const& lh = header.current();
uint128_t v1 = bigMultiply(getInclusionFee(), getMinInclusionFee(*mInnerTx, lh));
uint128_t v1 =
bigMultiply(getInclusionFee(), getMinInclusionFee(*mInnerTx, lh));
uint128_t v2 =
bigMultiply(mInnerTx->getInclusionFee(), getMinInclusionFee(*this, lh));
if (v1 < v2)
{
if (!bigDivide128(getResult().feeCharged, v2, getMinInclusionFee(*mInnerTx, lh),
if (!bigDivide128(getResult().feeCharged, v2,
getMinInclusionFee(*mInnerTx, lh),
Rounding::ROUND_UP))
{
getResult().feeCharged = INT64_MAX;
Expand Down
3 changes: 2 additions & 1 deletion src/transactions/TransactionFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,8 @@ TransactionFrame::commonValidPreSeqNum(Application& app, AbstractLedgerTxn& ltx,
return false;
}

if (chargeFee && getInclusionFee() < getMinInclusionFee(*this, header.current()))
if (chargeFee &&
getInclusionFee() < getMinInclusionFee(*this, header.current()))
{
getResult().result.code(txINSUFFICIENT_FEE);
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/transactions/TransactionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,7 @@ maybeUpdateAccountOnLedgerSeqUpdate(LedgerTxnHeader const& header,

int64_t
getMinInclusionFee(TransactionFrameBase const& tx, LedgerHeader const& header,
std::optional<int64_t> baseFee)
std::optional<int64_t> baseFee)
{
int64_t effectiveBaseFee = header.baseFee;
if (baseFee)
Expand Down
5 changes: 3 additions & 2 deletions src/transactions/TransactionUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ void maybeUpdateAccountOnLedgerSeqUpdate(LedgerTxnHeader const& header,
LedgerTxnEntry& account);

// Get min _inclusion_ fee needed for this transaction to get included
int64_t getMinInclusionFee(TransactionFrameBase const& tx, LedgerHeader const& header,
std::optional<int64_t> baseFee = std::nullopt);
int64_t getMinInclusionFee(TransactionFrameBase const& tx,
LedgerHeader const& header,
std::optional<int64_t> baseFee = std::nullopt);
}

5 comments on commit e019135

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from dmkozh
at marta-lokhova@e019135

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging marta-lokhova/stellar-core/get_fee_bid_audit = e019135 into auto

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marta-lokhova/stellar-core/get_fee_bid_audit = e019135 merged ok, testing candidate = 9b8a8d0

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9b8a8d0

Please sign in to comment.