added some comments

This commit is contained in:
Radu Ioan Fericean
2014-02-20 17:29:13 +02:00
parent c52b161b73
commit f052b14214
2 changed files with 3 additions and 1 deletions

View File

@@ -31,6 +31,8 @@ type UnitsCounter struct {
Balances BalanceChain // first balance is the general one (no destination)
}
// clears balances for this counter
// makes sure there are balances for all action triggers
func (uc *UnitsCounter) initBalances(ats []*ActionTrigger) {
uc.Balances = BalanceChain{&Balance{}} // general balance
for _, at := range ats {

View File

@@ -374,7 +374,7 @@ func (ub *UserBalance) countUnits(a *Action) {
ub.executeActionTriggers(nil)
}
// Create minute counters for all triggered actions that have actions operating on minute buckets
// Create minute counters for all triggered actions that have actions opertating on balances
func (ub *UserBalance) initCounters() {
ucTempMap := make(map[string]*UnitsCounter, 2)
for _, at := range ub.ActionTriggers {