Browse Source

old GetTreshold delete

master
yuriy0803 2 years ago
parent
commit
cde9475e52
  1. 10
      storage/redis.go

10
storage/redis.go

@ -856,16 +856,6 @@ func (r *RedisClient) GetBalance(login string) (int64, error) {
return cmd.Int64() return cmd.Int64()
} }
func (r *RedisClient) GetTreshold(login string) (int64, error) {
cmd := r.client.HGet(r.formatKey("miners", login), "payouttreshold")
if cmd.Err() == redis.Nil {
return 0, nil
} else if cmd.Err() != nil {
return 0, cmd.Err()
}
return cmd.Int64()
}
func (r *RedisClient) LockPayouts(login string, amount int64) error { func (r *RedisClient) LockPayouts(login string, amount int64) error {
key := r.formatKey("payments", "lock") key := r.formatKey("payments", "lock")
result := r.client.SetNX(key, join(login, amount), 0).Val() result := r.client.SetNX(key, join(login, amount), 0).Val()

Loading…
Cancel
Save