forked from TrueCloudLab/frostfs-sdk-go
pool: Use PublicKey like cache key instead of PrivateKey
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
This commit is contained in:
parent
dbbb22ca28
commit
77c2e227b9
1 changed files with 4 additions and 2 deletions
|
@ -1850,8 +1850,10 @@ func (p *innerPool) connection() (client, error) {
|
|||
}
|
||||
|
||||
func formCacheKey(address string, key *ecdsa.PrivateKey) string {
|
||||
k := keys.PrivateKey{PrivateKey: *key}
|
||||
return address + k.String()
|
||||
buf := make([]byte, 33)
|
||||
copy(buf, (*keys.PublicKey)(&key.PublicKey).Bytes())
|
||||
|
||||
return address + string(buf)
|
||||
}
|
||||
|
||||
func (p *Pool) checkSessionTokenErr(err error, address string) bool {
|
||||
|
|
Loading…
Reference in a new issue