Check if baltop offset is not negative
This commit is contained in:
1 file changed
+4
-1
@@ -176,7 +176,10 @@ internal class CachingBalanceManager private constructor() : BalanceManager {
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getBaltop(offset: Int): Result<Map<UUID?, Long>> = postgreSQL.getBaltop(offset)
|
||||
override suspend fun getBaltop(offset: Int): Result<Map<UUID?, Long>> {
|
||||
require(offset >= 0) { "offset must not be negative" }
|
||||
return postgreSQL.getBaltop(offset)
|
||||
}
|
||||
|
||||
override suspend fun getBaltopWithUuid(uuid: UUID): Result<Pair<Map<UUID?, Long>, Long>> =
|
||||
postgreSQL.getBaltopWithUuid(uuid)
|
||||
|
||||
Reference in new issue
Block a user