[#411] Remove unnecessary pointers for sync objects

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-05-30 10:14:37 +03:00 committed by Evgenii Stratonikov
parent f934abed8f
commit faca861451
20 changed files with 39 additions and 64 deletions

View file

@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"sync"
"time"
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
@ -105,13 +104,12 @@ func New(ctx context.Context, key *keys.PrivateKey, opts ...Option) (*Client, er
}
cli := &Client{
cache: newClientCache(),
logger: cfg.logger,
acc: acc,
accAddr: accAddr,
cfg: *cfg,
switchLock: &sync.RWMutex{},
closeChan: make(chan struct{}),
cache: newClientCache(),
logger: cfg.logger,
acc: acc,
accAddr: accAddr,
cfg: *cfg,
closeChan: make(chan struct{}),
}
cli.endpoints.init(cfg.endpoints)
@ -198,7 +196,6 @@ func newActor(ws *rpcclient.WSClient, acc *wallet.Account, cfg cfg) (*actor.Acto
func newClientCache() cache {
c, _ := lru.New[util.Uint256, uint32](100) // returns error only if size is negative
return cache{
m: &sync.RWMutex{},
txHeights: c,
}
}