satellite/uploadselection: avoid String conversation of location during node selection
Converting location to String is not free, better to avoid it.
81cb588c23/storj/location/countrycode.go (L32)
Thanks to Egon, who reported this issue.
See also: https://review.dev.storj.io/c/storj/common/+/10732
Change-Id: Ife348cffa59c020b46914a68be231c6eb75f06c9
This commit is contained in:
parent
2c3464081f
commit
1525324384
@ -34,7 +34,7 @@ func (c *Criteria) MatchInclude(node *SelectedNode) bool {
|
||||
}
|
||||
|
||||
for _, code := range c.ExcludedCountryCodes {
|
||||
if code.String() == "" {
|
||||
if code == location.None {
|
||||
continue
|
||||
}
|
||||
if node.CountryCode == code {
|
||||
|
Loading…
Reference in New Issue
Block a user