forked from TrueCloudLab/frostfs-node
[#365] settlement/basic: Check amount of collected assets
Some transfers from container owners into bank account may fail due to lack of assets, so we have to deal with remaining amount of assets in banking account. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
f85e5f0238
commit
4433448645
4 changed files with 28 additions and 2 deletions
|
@ -1,6 +1,20 @@
|
|||
package basic
|
||||
|
||||
import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func (inc *IncomeSettlementContext) Distribute() {
|
||||
inc.mu.Lock()
|
||||
defer inc.mu.Unlock()
|
||||
|
||||
bankBalance, err := inc.balances.Balance(inc.bankOwner)
|
||||
if err != nil {
|
||||
inc.log.Error("can't fetch balance of banking account",
|
||||
zap.String("error", err.Error()))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
_ = bankBalance
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue