Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.6] server/auth: no bonus tiers #2502

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions server/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,14 +894,14 @@ func (auth *AuthManager) UserScore(user account.AccountID) (score int32) {

// tier computes a user's tier from their conduct score and bond tier.
func (auth *AuthManager) tier(bondTier int64, score int32, legacyFeePaid bool) int64 {
tierAdj := int64(score) / int64(auth.banScore)
if tierAdj < 0 && bondTier == 0 {
tierAdj = 0 // no bonus tiers unless bonded
var penalties int64
if score > 0 {
penalties = int64(score) / int64(auth.banScore)
}
if legacyFeePaid {
bondTier++
}
return bondTier - tierAdj
return bondTier - penalties
}

// computeUserTier computes the user's tier given the provided score weighed
Expand Down