Revise balance blockers

This commit is contained in:
arberkatellari
2024-09-09 15:08:17 +02:00
committed by Dan Christian Bogos
parent 88ff4d9c4f
commit 7add01320e
4 changed files with 1577 additions and 63 deletions

View File

@@ -412,6 +412,9 @@ func (acc *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun bo
// check for blocker
if balance.Blocker {
if cd.GetDuration() != 0 {
if !dryRun {
return nil, utils.ErrInsufficientCreditBalanceBlocker
}
return
}
goto COMMIT // don't go to next balances
@@ -448,6 +451,9 @@ func (acc *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun bo
// check for blocker
if balance.Blocker {
if cd.GetDuration() != 0 {
if !dryRun {
return nil, utils.ErrInsufficientCreditBalanceBlocker
}
return
}
goto COMMIT // don't go to next balances