[#1213] morph/client: Use a separate cache for every client

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-03-15 14:33:09 +03:00 committed by Alex Vanin
parent 61f60b8461
commit a8d2001b35
2 changed files with 8 additions and 10 deletions

View file

@ -15,8 +15,6 @@ type multiClient struct {
sharedNotary *notary // notary config needed for single client construction
sharedCache cache
endpoints []string
clientsMtx sync.Mutex
clients map[string]*Client
@ -48,7 +46,7 @@ func (x *multiClient) createForAddress(addr string) (*Client, error) {
sCli.notary = x.sharedNotary
c = &Client{
cache: x.sharedCache,
cache: newClientCache(),
singleClient: sCli,
}
x.clients[addr] = c