0

Simple question, but I failed to grep for the answer…

It’s sayed balances are already deduced but where ? I mean which file and which line ?

// if we are in applying mode fee was already deduced from signing account
// balance, if not, we need to check if after that deduction this account
// will still have minimum balance
uint32_t feeToPay = (applying && (header.current().ledgerVersion > 8))

0

I think in LedgerManager:closeLedger at first fees are applied with processFeesSeqNums() and 6 lines later transactions are applied with applyTransactions() => tx->apply => TransactionFrame:apply => TransactionFrame:commonValid( ..., true)

  • This is the call stack of the line I gave. But as stated in the code, this is just a check as the fee is already substracted from acc.balance. So the real question is what’s the call chain that leads to acc.balance with the fee ? – user2284570 Jun 11 at 1:38
  • Follow the part where I said "at first fees are applied" => processFeesSeqNums() => LedgerManagerImpl::processFeesSeqNums => tx->processFeeSeqNum() => TransactionFrame::processFeeSeqNum where fee is deducted with stellar::addBalance(acc.balance, -fee); – sui Jun 11 at 6:18
  • Thank you… Just a last question : where transactions with negative fees are rejected ? – user2284570 Jun 16 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.