Skip to content

Commit

Permalink
fix: multiply logic
Browse files Browse the repository at this point in the history
  • Loading branch information
metacertain committed Jun 14, 2021
1 parent 17d3617 commit 16c5f31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/accounting/accounting.go
Original file line number Diff line number Diff line change
Expand Up @@ -1014,11 +1014,11 @@ func (a *Accounting) blocklistUntil(peer swarm.Address, multiplier int64) (int64
debt.Set(a.refreshRate)
}

multiplyDebt := new(big.Int).Mul(debt, big.NewInt(multiplier))
additionalDebt := new(big.Int).Add(debt, a.paymentThreshold)

additionalDebt := new(big.Int).Add(multiplyDebt, a.paymentThreshold)
multiplyDebt := new(big.Int).Mul(additionalDebt, big.NewInt(multiplier))

k := new(big.Int).Div(additionalDebt, a.refreshRate)
k := new(big.Int).Div(multiplyDebt, a.refreshRate)

kInt := k.Int64()

Expand Down

0 comments on commit 16c5f31

Please sign in to comment.