satellite/nodeselection: remove CountryCodeExclude

We don't need it any more, as CountryCode uses location.Set, which supports exclusion (`Without`).

Change-Id: Ie311ae19fefa0bc9a0161496af1233ef4a6607df
This commit is contained in:
Márton Elek 2023-07-31 18:45:55 +02:00 committed by Storj Robot
parent f7b39aaed4
commit 63c8cfe4c3

View File

@ -59,24 +59,6 @@ func (n NodeFilters) WithExcludedIDs(ds []storj.NodeID) NodeFilters {
var _ NodeFilter = NodeFilters{} var _ NodeFilter = NodeFilters{}
// CountryCodeExclude is a specific CountryFilter which excludes all nodes with the given country code.
type CountryCodeExclude []location.CountryCode
// MatchInclude implements NodeFilter interface.
func (c CountryCodeExclude) MatchInclude(node *SelectedNode) bool {
for _, code := range c {
if code == location.None {
continue
}
if node.CountryCode == code {
return false
}
}
return true
}
var _ NodeFilter = CountryCodeExclude{}
// CountryFilter can select nodes based on the condition of the country code. // CountryFilter can select nodes based on the condition of the country code.
type CountryFilter struct { type CountryFilter struct {
permit location.Set permit location.Set