RollbackInflightCredit rolls back (decreases) the inflight credit balance by the specified amount.
(amount *big.Int)
| 212 | |
| 213 | // RollbackInflightCredit rolls back (decreases) the inflight credit balance by the specified amount. |
| 214 | func (balance *Balance) RollbackInflightCredit(amount *big.Int) { |
| 215 | balance.InitializeBalanceFields() |
| 216 | if balance.InflightCreditBalance.Cmp(amount) >= 0 { |
| 217 | balance.InflightCreditBalance.Sub(balance.InflightCreditBalance, amount) |
| 218 | balance.computeBalance(true) // Update inflight balance. |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | // RollbackInflightDebit rolls back (decreases) the inflight debit balance by the specified amount. |
| 223 | func (balance *Balance) RollbackInflightDebit(amount *big.Int) { |