mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-08 17:48:12 -07:00
update dependencies and fix lint warnings
This commit is contained in:
@@ -120,13 +120,14 @@ func NewStore(cfg Config) (storage.PeerStorage, error) {
|
||||
|
||||
// Config holds the configuration of a redis PeerStorage.
|
||||
type Config struct {
|
||||
PeerLifetime time.Duration `cfg:"peer_lifetime"`
|
||||
Addresses []string
|
||||
TLS bool
|
||||
CACerts []string `cfg:"ca_certs"`
|
||||
DB int
|
||||
PoolSize int `cfg:"pool_size"`
|
||||
Login string
|
||||
PeerLifetime time.Duration `cfg:"peer_lifetime"`
|
||||
Addresses []string
|
||||
TLS bool
|
||||
CACerts []string `cfg:"ca_certs"`
|
||||
DB int
|
||||
PoolSize int `cfg:"pool_size"`
|
||||
Login string
|
||||
//nolint:gosec
|
||||
Password string
|
||||
Sentinel bool
|
||||
SentinelMaster string `cfg:"sentinel_master"`
|
||||
|
||||
@@ -27,14 +27,14 @@ type benchData struct {
|
||||
}
|
||||
|
||||
func generateInfoHashes() (a [ihCount]bittorrent.InfoHash) {
|
||||
for i := range a {
|
||||
for i := range ihCount {
|
||||
a[i] = randIH(i < ihCount/2)
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func generatePeers() (a [peersCount]bittorrent.Peer) {
|
||||
for i := range a {
|
||||
for i := range peersCount {
|
||||
var ip []byte
|
||||
if i%2 == 0 {
|
||||
ip = make([]byte, net.IPv4len)
|
||||
|
||||
Reference in New Issue
Block a user